From: batt Date: Mon, 15 Sep 2008 22:20:27 +0000 (+0000) Subject: Start to fix some tests. X-Git-Tag: 2.0.0~127 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=a4c1f94d9cf7f430e50b857335b3c99447396f0d;p=bertos.git Start to fix some tests. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1807 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/bertos/fs/battfs_test.c b/bertos/fs/battfs_test.c index 7b5600d5..f84f7fdf 100644 --- a/bertos/fs/battfs_test.c +++ b/bertos/fs/battfs_test.c @@ -140,7 +140,7 @@ static void test1(BattFsSuper *disk) fputc(0xff, fpt); fclose(fpt); for (int i = 0; i < PAGE_COUNT; i++) - ref[i] = PAGE_COUNT - i - 1; + ref[i] = i; testCheck(disk, ref); kprintf("Test1: passed\n"); @@ -186,7 +186,7 @@ static void test3(BattFsSuper *disk) for (int i = PAGE_COUNT / 2; i < PAGE_COUNT; i++) { - ref[i] = PAGE_COUNT + PAGE_COUNT / 2 - i - 1; + ref[i] = i; } @@ -194,6 +194,7 @@ static void test3(BattFsSuper *disk) kprintf("Test3: passed\n"); } +#if 0 static void test4(BattFsSuper *disk) { pgcnt_t ref[PAGE_COUNT]; @@ -248,6 +249,7 @@ static void test5(BattFsSuper *disk) testCheck(disk, ref); kprintf("Test5: passed\n"); } +#endif static void test6(BattFsSuper *disk) { @@ -260,7 +262,8 @@ static void test6(BattFsSuper *disk) battfs_writeTestBlock(disk, 0, 0, 0, 0, 0); battfs_writeTestBlock(disk, 1, 0, 0, 0, 1); battfs_writeTestBlock(disk, 2, 0, 1, 0, 1); - battfs_writeTestBlock(disk, 3, 0, 0, 0, 0); + disk->erase(disk, 3); + fclose(fp); ref[0] = 0; @@ -526,8 +529,8 @@ int battfs_testRun(void) test1(&disk); test2(&disk); test3(&disk); - test4(&disk); - test5(&disk); + //test4(&disk); + //test5(&disk); test6(&disk); test7(&disk); test8(&disk);