diff options
author | Charles Kerr <charles.kerr@canonical.com> | 2014-09-19 14:34:50 +0000 |
---|---|---|
committer | CI bot <ps-jenkins@lists.canonical.com> | 2014-09-19 14:34:50 +0000 |
commit | 16a4e034c30f2bc6b151b04707d3ec1a490dba44 (patch) | |
tree | f726165c9979fcb13ce478fd2dafa1ae1efad52b /tests/test-formatter.cpp | |
parent | ac54aebec5fa0ba95fb2d583316c0a64ce3384dd (diff) | |
parent | b3d8778a52576b66ab00b08aa939612136a49a01 (diff) | |
download | ayatana-indicator-datetime-16a4e034c30f2bc6b151b04707d3ec1a490dba44.tar.gz ayatana-indicator-datetime-16a4e034c30f2bc6b151b04707d3ec1a490dba44.tar.bz2 ayatana-indicator-datetime-16a4e034c30f2bc6b151b04707d3ec1a490dba44.zip |
Fix flint++ warnings
Approved by: Ted Gould, PS Jenkins bot
Diffstat (limited to 'tests/test-formatter.cpp')
-rw-r--r-- | tests/test-formatter.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test-formatter.cpp b/tests/test-formatter.cpp index 01df4f2..d011fea 100644 --- a/tests/test-formatter.cpp +++ b/tests/test-formatter.cpp @@ -46,7 +46,7 @@ class FormatterFixture: public GlibFixture std::shared_ptr<Settings> m_settings; - virtual void SetUp() + void SetUp() override { super::SetUp(); @@ -54,7 +54,7 @@ class FormatterFixture: public GlibFixture m_original_locale = g_strdup(setlocale(LC_TIME, nullptr)); } - virtual void TearDown() + void TearDown() override { m_settings.reset(); @@ -90,7 +90,7 @@ class FormatterFixture: public GlibFixture TEST_F(FormatterFixture, TestPhoneHeader) { auto now = g_date_time_new_local(2020, 10, 31, 18, 30, 59); - std::shared_ptr<Clock> clock(new MockClock(DateTime(now))); + auto clock = std::make_shared<MockClock>(DateTime(now)); g_date_time_unref(now); // test the default value in a 24h locale @@ -143,7 +143,7 @@ TEST_F(FormatterFixture, TestDesktopHeader) }; auto now = g_date_time_new_local(2020, 10, 31, 18, 30, 59); - std::shared_ptr<Clock> clock(new MockClock(DateTime(now))); + auto clock = std::make_shared<MockClock>(DateTime(now)); g_date_time_unref(now); for(const auto& test_case : test_cases) @@ -193,7 +193,7 @@ TEST_F(FormatterFixture, TestUpcomingTimes) { if (test_case.is_12h ? Set12hLocale() : Set24hLocale()) { - std::shared_ptr<Clock> clock (new MockClock(DateTime(test_case.now))); + auto clock = std::make_shared<MockClock>(DateTime(test_case.now)); DesktopFormatter f(clock, m_settings); const auto fmt = f.relative_format(test_case.then); @@ -236,7 +236,7 @@ TEST_F(FormatterFixture, TestEventTimes) { if (test_case.is_12h ? Set12hLocale() : Set24hLocale()) { - std::shared_ptr<Clock> clock(new MockClock(DateTime(test_case.now))); + auto clock = std::make_shared<MockClock>(DateTime(test_case.now)); DesktopFormatter f(clock, m_settings); const auto fmt = f.relative_format(test_case.then, test_case.then_end); |