aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@canonical.com>2016-03-23 15:47:07 -0300
committerRobert Tari <robert@tari.in>2021-07-05 00:44:12 +0200
commitb2d8ad98b4c6360d8b67faf67b1a5f20d4de8f2d (patch)
tree29f41575d6de19acc3549a5564dc14c5589fb32b
parente9a8c238ef8a4285dd13e31c95610bdf692efd14 (diff)
downloadayatana-indicator-datetime-b2d8ad98b4c6360d8b67faf67b1a5f20d4de8f2d.tar.gz
ayatana-indicator-datetime-b2d8ad98b4c6360d8b67faf67b1a5f20d4de8f2d.tar.bz2
ayatana-indicator-datetime-b2d8ad98b4c6360d8b67faf67b1a5f20d4de8f2d.zip
Attempt to fix test on xenial.
-rw-r--r--tests/test-formatter.cpp11
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);