mirror of
https://github.com/Gnucash/gnucash.git
synced 2026-09-03 20:53:02 -05:00
Revert r23043 "Minor code cleanup: Don't print "warning" output in comparison function."
Sigh. It turns out the utest-Split.c relies on the "warning" log level in order to check for specific code paths. This sucks. The log level "warning" should please be reserved for things that are actual warnings, not for code path checks that are used in the unittests. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23048 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
+12
-12
@@ -780,7 +780,7 @@ xaccTransEqual(const Transaction *ta, const Transaction *tb,
|
|||||||
|
|
||||||
if (!ta || !tb)
|
if (!ta || !tb)
|
||||||
{
|
{
|
||||||
PINFO ("one is NULL");
|
PWARN ("one is NULL");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -792,14 +792,14 @@ xaccTransEqual(const Transaction *ta, const Transaction *tb,
|
|||||||
{
|
{
|
||||||
if (qof_instance_guid_compare(ta, tb) != 0)
|
if (qof_instance_guid_compare(ta, tb) != 0)
|
||||||
{
|
{
|
||||||
PINFO ("GUIDs differ");
|
PWARN ("GUIDs differ");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gnc_commodity_equal(ta->common_currency, tb->common_currency))
|
if (!gnc_commodity_equal(ta->common_currency, tb->common_currency))
|
||||||
{
|
{
|
||||||
PINFO ("commodities differ %s vs %s",
|
PWARN ("commodities differ %s vs %s",
|
||||||
gnc_commodity_get_unique_name (ta->common_currency),
|
gnc_commodity_get_unique_name (ta->common_currency),
|
||||||
gnc_commodity_get_unique_name (tb->common_currency));
|
gnc_commodity_get_unique_name (tb->common_currency));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -812,7 +812,7 @@ xaccTransEqual(const Transaction *ta, const Transaction *tb,
|
|||||||
|
|
||||||
(void)gnc_timespec_to_iso8601_buff(ta->date_entered, buf1);
|
(void)gnc_timespec_to_iso8601_buff(ta->date_entered, buf1);
|
||||||
(void)gnc_timespec_to_iso8601_buff(tb->date_entered, buf2);
|
(void)gnc_timespec_to_iso8601_buff(tb->date_entered, buf2);
|
||||||
PINFO ("date entered differs: '%s' vs '%s'", buf1, buf2);
|
PWARN ("date entered differs: '%s' vs '%s'", buf1, buf2);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -823,7 +823,7 @@ xaccTransEqual(const Transaction *ta, const Transaction *tb,
|
|||||||
|
|
||||||
(void)gnc_timespec_to_iso8601_buff(ta->date_posted, buf1);
|
(void)gnc_timespec_to_iso8601_buff(ta->date_posted, buf1);
|
||||||
(void)gnc_timespec_to_iso8601_buff(tb->date_posted, buf2);
|
(void)gnc_timespec_to_iso8601_buff(tb->date_posted, buf2);
|
||||||
PINFO ("date posted differs: '%s' vs '%s'", buf1, buf2);
|
PWARN ("date posted differs: '%s' vs '%s'", buf1, buf2);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -832,14 +832,14 @@ xaccTransEqual(const Transaction *ta, const Transaction *tb,
|
|||||||
*/
|
*/
|
||||||
if ((same_book && ta->num != tb->num) || (!same_book && g_strcmp0(ta->num, tb->num) != 0))
|
if ((same_book && ta->num != tb->num) || (!same_book && g_strcmp0(ta->num, tb->num) != 0))
|
||||||
{
|
{
|
||||||
PINFO ("num differs: %s vs %s", ta->num, tb->num);
|
PWARN ("num differs: %s vs %s", ta->num, tb->num);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((same_book && ta->description != tb->description)
|
if ((same_book && ta->description != tb->description)
|
||||||
|| (!same_book && g_strcmp0(ta->description, tb->description)))
|
|| (!same_book && g_strcmp0(ta->description, tb->description)))
|
||||||
{
|
{
|
||||||
PINFO ("descriptions differ: %s vs %s", ta->description, tb->description);
|
PWARN ("descriptions differ: %s vs %s", ta->description, tb->description);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -851,7 +851,7 @@ xaccTransEqual(const Transaction *ta, const Transaction *tb,
|
|||||||
frame_a = kvp_frame_to_string (ta->inst.kvp_data);
|
frame_a = kvp_frame_to_string (ta->inst.kvp_data);
|
||||||
frame_b = kvp_frame_to_string (tb->inst.kvp_data);
|
frame_b = kvp_frame_to_string (tb->inst.kvp_data);
|
||||||
|
|
||||||
PINFO ("kvp frames differ:\n%s\n\nvs\n\n%s", frame_a, frame_b);
|
PWARN ("kvp frames differ:\n%s\n\nvs\n\n%s", frame_a, frame_b);
|
||||||
|
|
||||||
g_free (frame_a);
|
g_free (frame_a);
|
||||||
g_free (frame_b);
|
g_free (frame_b);
|
||||||
@@ -863,7 +863,7 @@ xaccTransEqual(const Transaction *ta, const Transaction *tb,
|
|||||||
{
|
{
|
||||||
if ((!ta->splits && tb->splits) || (!tb->splits && ta->splits))
|
if ((!ta->splits && tb->splits) || (!tb->splits && ta->splits))
|
||||||
{
|
{
|
||||||
PINFO ("only one has splits");
|
PWARN ("only one has splits");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -885,7 +885,7 @@ xaccTransEqual(const Transaction *ta, const Transaction *tb,
|
|||||||
|
|
||||||
if (!node_b)
|
if (!node_b)
|
||||||
{
|
{
|
||||||
PINFO ("first has split %s and second does not",
|
PWARN ("first has split %s and second does not",
|
||||||
guid_to_string (xaccSplitGetGUID (split_a)));
|
guid_to_string (xaccSplitGetGUID (split_a)));
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -901,14 +901,14 @@ xaccTransEqual(const Transaction *ta, const Transaction *tb,
|
|||||||
guid_to_string_buff (xaccSplitGetGUID (split_a), str_a);
|
guid_to_string_buff (xaccSplitGetGUID (split_a), str_a);
|
||||||
guid_to_string_buff (xaccSplitGetGUID (split_b), str_b);
|
guid_to_string_buff (xaccSplitGetGUID (split_b), str_b);
|
||||||
|
|
||||||
PINFO ("splits %s and %s differ", str_a, str_b);
|
PWARN ("splits %s and %s differ", str_a, str_b);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_list_length (ta->splits) != g_list_length (tb->splits))
|
if (g_list_length (ta->splits) != g_list_length (tb->splits))
|
||||||
{
|
{
|
||||||
PINFO ("different number of splits");
|
PWARN ("different number of splits");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user