From 06162370643aa80505e7e3964545a1c8e1a023e0 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Fri, 23 Jan 2009 17:56:25 +0000 Subject: [PATCH] [tests] Assert as soon as possible In order to give a usable location of the errors in the test suite, we need to assert() as soon as possible. --- tests/conform/test-timeline.c | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/tests/conform/test-timeline.c b/tests/conform/test-timeline.c index 1e6ab6258..119630c2b 100644 --- a/tests/conform/test-timeline.c +++ b/tests/conform/test-timeline.c @@ -258,12 +258,9 @@ test_timeline (TestConformSimpleFixture *fixture, clutter_main (); - if (!check_timeline (timeline_1, &data_1, TRUE)) - pass = FALSE; - if (!check_timeline (timeline_2, &data_2, TRUE)) - pass = FALSE; - if (!check_timeline (timeline_3, &data_3, TRUE)) - pass = FALSE; + g_assert (check_timeline (timeline_1, &data_1, TRUE)); + g_assert (check_timeline (timeline_2, &data_2, TRUE)); + g_assert (check_timeline (timeline_3, &data_3, TRUE)); if (g_test_verbose ()) g_print ("With delay...\n"); @@ -284,12 +281,9 @@ test_timeline (TestConformSimpleFixture *fixture, clutter_main (); - if (!check_timeline (timeline_1, &data_1, FALSE)) - pass = FALSE; - if (!check_timeline (timeline_2, &data_2, FALSE)) - pass = FALSE; - if (!check_timeline (timeline_3, &data_3, FALSE)) - pass = FALSE; + g_assert (check_timeline (timeline_1, &data_1, FALSE)); + g_assert (check_timeline (timeline_2, &data_2, FALSE)); + g_assert (check_timeline (timeline_3, &data_3, FALSE)); g_object_unref (timeline_1); g_object_unref (timeline_2); @@ -300,9 +294,4 @@ test_timeline (TestConformSimpleFixture *fixture, timeline_data_destroy (&data_3); g_source_remove (delay_tag); - - if (g_test_verbose ()) - g_print ("Overall result: %s\n", pass == TRUE ? "PASS" : "FAIL"); - - g_assert (pass == TRUE); }