mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug 790845 - 2.7.3: massive test failures on some architectures (reopened).
Fix some test failures caused by erroneous size assumptions.
This commit is contained in:
@@ -312,11 +312,11 @@ class GncNumeric(GnuCashCoreClass):
|
||||
raise TypeError('Only two ints allowed: ' + str(args))
|
||||
elif len(args) == 3:
|
||||
if type(args[0]) == float \
|
||||
and type(args[1]) == type(GNC_DENOM_AUTO) \
|
||||
and type(args[1]) in (int, long) \
|
||||
and type(args[2]) == type(GNC_HOW_DENOM_FIXED):
|
||||
return double_to_gnc_numeric(*args)
|
||||
else:
|
||||
raise TypeError('Only (float, GNC_HOW_RND_*, GNC_HOW_RND_*, GNC_HOW_RND_*) allowed: ' + str(args))
|
||||
raise TypeError('Only (float, int/long, GNC_HOW_RND_*) allowed: ' + str(args))
|
||||
else:
|
||||
raise TypeError('Required single int/float/str or two ints: ' + str(args))
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ GncSqlColumnTableEntryImpl<CT_BOOLEAN>::load (const GncSqlBackend* sql_be,
|
||||
g_return_if_fail (m_gobj_param_name != NULL || get_setter(obj_name) != NULL);
|
||||
|
||||
auto val = row.get_int_at_col (m_col_name);
|
||||
set_parameter(pObject, val,
|
||||
set_parameter(pObject, static_cast<int>(val),
|
||||
reinterpret_cast<BooleanSetterFunc>(get_setter(obj_name)),
|
||||
m_gobj_param_name);
|
||||
}
|
||||
|
||||
@@ -145,6 +145,7 @@ TEST(gnc_timezone_constructors, test_IANA_Perth_tz)
|
||||
for (int year = 1893; year < 2048; ++year)
|
||||
{
|
||||
auto tz = tzp.get(year);
|
||||
#ifdef __LP64__
|
||||
if (year < 1895)
|
||||
{
|
||||
EXPECT_EQ(tz->std_zone_abbrev(), "LMT");
|
||||
@@ -152,6 +153,9 @@ TEST(gnc_timezone_constructors, test_IANA_Perth_tz)
|
||||
EXPECT_EQ(tz->base_utc_offset().total_seconds(), 27804);
|
||||
}
|
||||
else if (year < 1916)
|
||||
#else
|
||||
if (year < 1916)
|
||||
#endif
|
||||
{
|
||||
EXPECT_EQ(tz->std_zone_abbrev(), "AWST");
|
||||
EXPECT_FALSE(tz->has_dst());
|
||||
@@ -203,6 +207,7 @@ TEST(gnc_timezone_constructors, test_IANA_Minsk_tz)
|
||||
for (int year = 1870; year < 2020; ++year)
|
||||
{
|
||||
auto tz = tzp.get(year);
|
||||
#ifdef __LP64__
|
||||
if (year < 1879)
|
||||
{
|
||||
EXPECT_EQ(tz->std_zone_abbrev(), "LMT");
|
||||
@@ -210,6 +215,9 @@ TEST(gnc_timezone_constructors, test_IANA_Minsk_tz)
|
||||
EXPECT_EQ(tz->base_utc_offset().total_seconds(), 6616);
|
||||
}
|
||||
else if (year < 1924)
|
||||
#else
|
||||
if (year < 1924)
|
||||
#endif
|
||||
{
|
||||
EXPECT_EQ(tz->std_zone_abbrev(), "MMT");
|
||||
EXPECT_FALSE(tz->has_dst());
|
||||
|
||||
Reference in New Issue
Block a user