diff options
Diffstat (limited to 'tests/array-test.c')
| -rw-r--r-- | tests/array-test.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/array-test.c b/tests/array-test.c index 2be369f..0269e3e 100644 --- a/tests/array-test.c +++ b/tests/array-test.c @@ -45,16 +45,16 @@ TEST(array_init) TEST(array_add) { struct mydata { - int a; - unsigned b; + unsigned int a; + unsigned int b; double c; double d; }; - const int iterations = 1321; /* this is arbitrary */ + const unsigned int iterations = 1321; /* this is arbitrary */ const int datasize = sizeof(struct mydata); struct wl_array array; - int i; + size_t i; wl_array_init(&array); @@ -64,7 +64,7 @@ TEST(array_add) assert((i + 1) * datasize == array.size); ptr->a = i * 3; - ptr->b = -i; + ptr->b = 20000 - i; ptr->c = (double)(i); ptr->d = (double)(i / 2.); } @@ -75,7 +75,7 @@ TEST(array_add) struct mydata* check = (struct mydata*)(array.data + index); assert(check->a == i * 3); - assert(check->b == -i); + assert(check->b == 20000 - i); assert(check->c == (double)(i)); assert(check->d == (double)(i/2.)); } |
