lcg_srand (testnum);
- op = op_list[lcg_rand_n (sizeof (op_list) / sizeof (op_list[0]))];
+ op = op_list[lcg_rand_n (ARRAY_LENGTH (op_list))];
if (lcg_rand_n (8))
{
},
};
-int n_test_cases = sizeof(testcases)/sizeof(testcases[0]);
+int n_test_cases = ARRAY_LENGTH (testcases);
static uint32_t
if (i == 0)
{
stops = onestop;
- num_stops = sizeof(onestop) / sizeof(onestop[0]);
+ num_stops = ARRAY_LENGTH (onestop);
}
else if (i == 1)
{
stops = subsetstops;
- num_stops = sizeof(subsetstops) / sizeof(subsetstops[0]);
+ num_stops = ARRAY_LENGTH (subsetstops);
}
else
{
stops = stops01;
- num_stops = sizeof(stops01) / sizeof(stops01[0]);
+ num_stops = ARRAY_LENGTH (stops01);
}
for (j = 0; j < 3; ++j)
x / 1000000., x / 4000000);
printf ("---\n");
- for (i = 0; i < sizeof(tests_tbl) / sizeof(tests_tbl[0]); i++)
+ for (i = 0; i < ARRAY_LENGTH (tests_tbl); i++)
{
if (strcmp (pattern, "all") == 0 || strstr (tests_tbl[i].testname, pattern))
{
{
int i;
- for (i = 0; i < sizeof (info) / sizeof (info[0]); ++i)
+ for (i = 0; i < ARRAY_LENGTH (info); ++i)
test_composite (&info[i]);
return 0;
dst = pixman_image_create_bits (PIXMAN_a8, 1, 1, NULL, -1);
- pixman_add_trapezoids (dst, 0, 0, sizeof (traps)/sizeof (traps[0]), traps);
+ pixman_add_trapezoids (dst, 0, 0, ARRAY_LENGTH (traps), traps);
return (0);
}