Fix test failure from Bug 798616 fix.

This commit is contained in:
John Ralls 2022-09-20 09:09:28 -07:00
parent 43b6c17b92
commit 2505955ab9

View File

@ -760,10 +760,10 @@ test_get_currency_denom (Fixture *fixture, gconstpointer pData)
const gint denom = gnc_commodity_get_fraction (fixture->curr);
g_assert_cmpint (fixture->func->get_currency_denom (NULL), ==, 0);
fixture->split->parent = NULL;
g_assert_cmpint (fixture->func->get_currency_denom (fixture->split), ==, GNC_COMMODITY_MAX_FRACTION);
g_assert_cmpint (fixture->func->get_currency_denom (fixture->split), ==, GNC_DENOM_AUTO);
fixture->split->parent = txn;
txn->common_currency = NULL;
g_assert_cmpint (fixture->func->get_currency_denom (fixture->split), ==, GNC_COMMODITY_MAX_FRACTION);
g_assert_cmpint (fixture->func->get_currency_denom (fixture->split), ==, GNC_DENOM_AUTO);
txn->common_currency = fixture->curr;
g_assert_cmpint (fixture->func->get_currency_denom (fixture->split), ==, denom);
}
@ -778,7 +778,7 @@ test_get_commodity_denom (Fixture *fixture, gconstpointer pData)
const gint denom = gnc_commodity_get_fraction (fixture->comm);
g_assert_cmpint (fixture->func->get_commodity_denom (NULL), ==, 0);
fixture->split->acc = NULL;
g_assert_cmpint (fixture->func->get_commodity_denom (fixture->split), ==, GNC_COMMODITY_MAX_FRACTION);
g_assert_cmpint (fixture->func->get_commodity_denom (fixture->split), ==, GNC_DENOM_AUTO);
fixture->split->acc = acc;
g_assert_cmpint (fixture->func->get_commodity_denom (fixture->split), ==, denom);
}