D | overflow.c | 25 static const Case cases[] = { in test_checked_guint_add() local 39 for (i = 0; i < G_N_ELEMENTS (cases); i++) in test_checked_guint_add() 43 g_assert_cmpuint (cases[i].success, ==, g_uint_checked_add (&result, cases[i].a, cases[i].b)); in test_checked_guint_add() 44 if (cases[i].success) in test_checked_guint_add() 45 g_assert_cmpuint (cases[i].c, ==, result); in test_checked_guint_add() 52 static const Case cases[] = { in test_checked_guint_mul() local 66 for (i = 0; i < G_N_ELEMENTS (cases); i++) in test_checked_guint_mul() 70 g_assert_cmpuint (cases[i].success, ==, g_uint_checked_mul (&result, cases[i].a, cases[i].b)); in test_checked_guint_mul() 71 if (cases[i].success) in test_checked_guint_mul() 72 g_assert_cmpuint (cases[i].c, ==, result); in test_checked_guint_mul() [all …]
|