aboutsummaryrefslogtreecommitdiff
path: root/tests/test-formatter.cpp
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2021-08-30 01:26:19 +0200
committerRobert Tari <robert@tari.in>2021-08-30 01:26:19 +0200
commit22e66866c7b17fc655479ca911269b86cb80a744 (patch)
treee0aa6e6a8f50fd8451e03efc17b89d8c8c3de781 /tests/test-formatter.cpp
parent1f8263dedf9b7e6f9e06492bd69f2436e36171a2 (diff)
parent38e5efecbb3154a83a70c1c762802ec7927b3caa (diff)
downloadayatana-indicator-datetime-22e66866c7b17fc655479ca911269b86cb80a744.tar.gz
ayatana-indicator-datetime-22e66866c7b17fc655479ca911269b86cb80a744.tar.bz2
ayatana-indicator-datetime-22e66866c7b17fc655479ca911269b86cb80a744.zip
Merge branch 'tari01-pr/ubports-patches'
Attributes GH PR #46: https://github.com/AyatanaIndicators/ayatana-indicator-datetime/pull/46
Diffstat (limited to 'tests/test-formatter.cpp')
-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 855d4c5..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;
}
}
@@ -87,7 +86,7 @@ class FormatterFixture: public GlibFixture
/**
* Test the phone header format
*/
-TEST_F(FormatterFixture, TestPhoneHeader)
+TEST_F(FormatterFixture, DISABLED_TestPhoneHeader)
{
auto now = DateTime::Local(2020, 10, 31, 18, 30, 59);
auto clock = std::make_shared<MockClock>(now);
@@ -114,7 +113,7 @@ TEST_F(FormatterFixture, TestPhoneHeader)
/**
* Test the default values of the desktop header format
*/
-TEST_F(FormatterFixture, TestDesktopHeader)
+TEST_F(FormatterFixture, DISABLED_TestDesktopHeader)
{
struct {
bool is_12h;