aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRenato Araujo Oliveira Filho <renato.filho@canonical.com>2016-03-23 15:47:07 -0300
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-08-29 14:37:39 +0200
commit11d4b57fd24e8661ab60a09980e4cad13f4e15d7 (patch)
treeb873429ff952766d7b448dcf91b81ab7ec9d3641 /tests
parent99de274e9131f732833f0270baa3dac38a287975 (diff)
downloadayatana-indicator-datetime-11d4b57fd24e8661ab60a09980e4cad13f4e15d7.tar.gz
ayatana-indicator-datetime-11d4b57fd24e8661ab60a09980e4cad13f4e15d7.tar.bz2
ayatana-indicator-datetime-11d4b57fd24e8661ab60a09980e4cad13f4e15d7.zip
Attempt to fix test on xenial.
Diffstat (limited to 'tests')
-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);