Changes in tests/alloc2.cfa [1b55756:f76ff0b]
- File:
-
- 1 edited
-
tests/alloc2.cfa (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tests/alloc2.cfa
r1b55756 rf76ff0b 13 13 void test_base( void * ip, size_t size, size_t align) { 14 14 tests_total += 1; 15 // printf("DEBUG: starting test %d\n", tests_total);16 15 bool passed = (malloc_size(ip) == size) && (malloc_usable_size(ip) >= size) && (malloc_alignment(ip) == align) && ((uintptr_t)ip % align == 0); 17 16 if (!passed) { … … 19 18 tests_failed += 1; 20 19 } 21 // printf("DEBUG: done test %d\n", tests_total);22 20 } 23 21 24 22 void test_fill( void * ip_, size_t start, size_t end, char fill) { 25 23 tests_total += 1; 26 // printf("DEBUG: starting test %d\n", tests_total);27 24 bool passed = true; 28 25 char * ip = (char *) ip_; … … 32 29 tests_failed += 1; 33 30 } 34 // printf("DEBUG: done test %d\n", tests_total);35 31 } 36 32 37 33 void test_fill( void * ip_, size_t start, size_t end, int fill) { 38 34 tests_total += 1; 39 // printf("DEBUG: starting test %d\n", tests_total);40 35 bool passed = true; 41 36 int * ip = (int *) ip_; … … 45 40 tests_failed += 1; 46 41 } 47 // printf("DEBUG: done test %d\n", tests_total);48 42 } 49 43 50 44 void test_fill( void * ip_, size_t start, size_t end, int * fill) { 51 45 tests_total += 1; 52 // printf("DEBUG: starting test %d\n", tests_total);53 46 bool passed = (memcmp((void*)((uintptr_t)ip_ + start), (void*)fill, end) == 0); 54 47 if (!passed) { … … 56 49 tests_failed += 1; 57 50 } 58 // printf("DEBUG: done test %d\n", tests_total);59 51 } 60 52 61 53 void test_fill( void * ip_, size_t start, size_t end, T1 fill) { 62 54 tests_total += 1; 63 // printf("DEBUG: starting test %d\n", tests_total);64 55 bool passed = true; 65 56 T1 * ip = (T1 *) ip_; … … 69 60 tests_failed += 1; 70 61 } 71 // printf("DEBUG: done test %d\n", tests_total);72 62 } 73 63 74 64 void test_fill( void * ip_, size_t start, size_t end, T1 * fill) { 75 65 tests_total += 1; 76 // printf("DEBUG: starting test %d\n", tests_total);77 66 bool passed = (memcmp((void*)((uintptr_t)ip_ + start), (void*)fill, end) == 0); 78 67 if (!passed) { … … 80 69 tests_failed += 1; 81 70 } 82 // printf("DEBUG: done test %d\n", tests_total);83 71 } 84 72 85 73 void test_use( int * ip, size_t dim) { 86 74 tests_total += 1; 87 // printf("DEBUG: starting test %d\n", tests_total);88 75 bool passed = true; 89 76 for (i; 0 ~ dim) ip[i] = 0xdeadbeef; … … 93 80 tests_failed += 1; 94 81 } 95 // printf("DEBUG: done test %d\n", tests_total);96 82 } 97 83 98 84 void test_use( T1 * ip, size_t dim) { 99 85 tests_total += 1; 100 // printf("DEBUG: starting test %d\n", tests_total);101 86 bool passed = true; 102 87 for (i; 0 ~ dim) ip[i].data = 0xdeadbeef; … … 106 91 tests_failed += 1; 107 92 } 108 // printf("DEBUG: done test %d\n", tests_total);109 93 } 110 94
Note:
See TracChangeset
for help on using the changeset viewer.