From b2d8ad98b4c6360d8b67faf67b1a5f20d4de8f2d Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Wed, 23 Mar 2016 15:47:07 -0300 Subject: Attempt to fix test on xenial. --- tests/test-formatter.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'tests/test-formatter.cpp') diff --git a/tests/test-formatter.cpp b/tests/test-formatter.cpp index 1f1c3e2..87c6475 100644 --- a/tests/test-formatter.cpp +++ b/tests/test-formatter.cpp @@ -66,15 +66,14 @@ class FormatterFixture: public GlibFixture bool SetLocale(const char* expected_locale, const char* name) { - setlocale(LC_TIME, expected_locale); - const auto actual_locale = setlocale(LC_TIME, nullptr); - if (!g_strcmp0(expected_locale, actual_locale)) + if (setlocale(LC_TIME, expected_locale) != nullptr) { return true; } else { - g_message("Unable to set locale to %s, actual locale is %s; skipping %s locale tests.", expected_locale, actual_locale, name); + g_warning("Unable to set locale to %s; skipping %s locale tests. (Current LC_TIME: %s)", + expected_locale, name, setlocale(LC_TIME, nullptr)); return false; } } @@ -168,7 +167,7 @@ TEST_F(FormatterFixture, DISABLED_TestDesktopHeader) /** * Test the default values of the desktop header format */ -TEST_F(FormatterFixture, DISABLED_TestUpcomingTimes) +TEST_F(FormatterFixture, TestUpcomingTimes) { auto a = DateTime::Local(2020, 10, 31, 18, 30, 59); @@ -210,7 +209,7 @@ TEST_F(FormatterFixture, DISABLED_TestUpcomingTimes) /** * Test the default values of the desktop header format */ -TEST_F(FormatterFixture, DISABLED_TestEventTimes) +TEST_F(FormatterFixture, TestEventTimes) { auto day = DateTime::Local(2013, 1, 1, 13, 0, 0); auto day_begin = DateTime::Local(2013, 1, 1, 13, 0, 0); -- cgit v1.2.3