[Testing] Fix a missed execution path detected with error message counting.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@22136 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
John Ralls
2012-04-03 21:35:58 +00:00
parent 12387c1c02
commit 57b82171dc
+16
View File
@@ -429,6 +429,7 @@ test_xaccSplitEqual (Fixture *fixture, gconstpointer pData)
test_add_error (&checkA);
test_add_error (&checkB);
test_add_error (&checkC);
test_add_error (&checkD);
g_test_log_set_fatal_handler ((GTestLogFatalFunc)test_list_handler, &checkA);
hdlr = g_log_set_handler (logdomain, loglevel,
@@ -499,6 +500,21 @@ test_xaccSplitEqual (Fixture *fixture, gconstpointer pData)
g_assert_cmpint (checkB.hits, ==, 4);
g_assert_cmpint (checkC.hits, ==, 2);
g_assert_cmpint (checkD.hits, ==, 0);
split2->balance = fixture->split->balance;
g_assert (xaccSplitEqual (fixture->split, split2, TRUE, TRUE, TRUE) == FALSE);
g_assert_cmpint (checkA.hits, ==, 12);
g_assert_cmpint (checkB.hits, ==, 4);
g_assert_cmpint (checkC.hits, ==, 4);
g_assert_cmpint (checkD.hits, ==, 0);
split2->cleared_balance = fixture->split->cleared_balance;
g_assert (xaccSplitEqual (fixture->split, split2, TRUE, TRUE, TRUE) == FALSE);
g_assert_cmpint (checkA.hits, ==, 12);
g_assert_cmpint (checkB.hits, ==, 4);
g_assert_cmpint (checkC.hits, ==, 4);
g_assert_cmpint (checkD.hits, ==, 2);
test_clear_error_list ();
g_assert (xaccSplitEqual (fixture->split, split2, TRUE, FALSE, TRUE) == TRUE);
g_object_unref (split1);