mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[utest-Account] test old dxaccAccount* functions
dxaccAccountGetPriceSrc and dxaccAccountGetQuoteTZ. DxaccAccountSetCurrency remains untested - unsure how to retrieve an ISO4217 currency to use as parameter.
This commit is contained in:
parent
57cb8c193a
commit
4309469730
@ -1216,6 +1216,33 @@ test_gnc_account_kvp_setters_getters (Fixture *fixture, gconstpointer pData)
|
|||||||
xaccAccountSetNotes (account, nullptr);
|
xaccAccountSetNotes (account, nullptr);
|
||||||
g_assert_cmpstr (xaccAccountGetNotes (account), ==, nullptr);
|
g_assert_cmpstr (xaccAccountGetNotes (account), ==, nullptr);
|
||||||
|
|
||||||
|
// STOCK_ACCOUNT tests from now on
|
||||||
|
xaccAccountSetType (account, ACCT_TYPE_STOCK);
|
||||||
|
|
||||||
|
// dxaccAccountGetPriceSrc getter/setter
|
||||||
|
g_assert_cmpstr (dxaccAccountGetPriceSrc (account), ==, nullptr);
|
||||||
|
|
||||||
|
dxaccAccountSetPriceSrc (account, "boo");
|
||||||
|
g_assert_cmpstr (dxaccAccountGetPriceSrc (account), ==, "boo");
|
||||||
|
|
||||||
|
dxaccAccountSetPriceSrc (account, "");
|
||||||
|
g_assert_cmpstr (dxaccAccountGetPriceSrc (account), ==, "");
|
||||||
|
|
||||||
|
dxaccAccountSetPriceSrc (account, nullptr);
|
||||||
|
g_assert_cmpstr (dxaccAccountGetPriceSrc (account), ==, nullptr);
|
||||||
|
|
||||||
|
// dxaccAccountGetQuoteTZ getter/setter
|
||||||
|
g_assert_cmpstr (dxaccAccountGetQuoteTZ (account), ==, nullptr);
|
||||||
|
|
||||||
|
dxaccAccountSetQuoteTZ (account, "boo");
|
||||||
|
g_assert_cmpstr (dxaccAccountGetQuoteTZ (account), ==, "boo");
|
||||||
|
|
||||||
|
dxaccAccountSetQuoteTZ (account, "");
|
||||||
|
g_assert_cmpstr (dxaccAccountGetQuoteTZ (account), ==, "");
|
||||||
|
|
||||||
|
dxaccAccountSetQuoteTZ (account, nullptr);
|
||||||
|
g_assert_cmpstr (dxaccAccountGetQuoteTZ (account), ==, nullptr);
|
||||||
|
|
||||||
xaccAccountBeginEdit (account);
|
xaccAccountBeginEdit (account);
|
||||||
xaccAccountDestroy (account);
|
xaccAccountDestroy (account);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user