diff options
author | Renato Araujo Oliveira Filho <renato.filho@canonical.com> | 2016-03-23 15:47:07 -0300 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2021-07-05 00:44:12 +0200 |
commit | b2d8ad98b4c6360d8b67faf67b1a5f20d4de8f2d (patch) | |
tree | 29f41575d6de19acc3549a5564dc14c5589fb32b /tests | |
parent | e9a8c238ef8a4285dd13e31c95610bdf692efd14 (diff) | |
download | ayatana-indicator-datetime-b2d8ad98b4c6360d8b67faf67b1a5f20d4de8f2d.tar.gz ayatana-indicator-datetime-b2d8ad98b4c6360d8b67faf67b1a5f20d4de8f2d.tar.bz2 ayatana-indicator-datetime-b2d8ad98b4c6360d8b67faf67b1a5f20d4de8f2d.zip |
Attempt to fix test on xenial.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-formatter.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
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); |