aboutsummaryrefslogtreecommitdiff
path: root/tests/test-formatter.cpp
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-09-17 11:51:51 -0500
committerCharles Kerr <charles.kerr@canonical.com>2014-09-17 11:51:51 -0500
commitb3d8778a52576b66ab00b08aa939612136a49a01 (patch)
tree4dc77aeee18620be145cd1765b8eb0902af40b3e /tests/test-formatter.cpp
parent790f43bcea23f926f6617e0fe41026a3adaee8cc (diff)
downloadayatana-indicator-datetime-b3d8778a52576b66ab00b08aa939612136a49a01.tar.gz
ayatana-indicator-datetime-b3d8778a52576b66ab00b08aa939612136a49a01.tar.bz2
ayatana-indicator-datetime-b3d8778a52576b66ab00b08aa939612136a49a01.zip
fix flint++ warnings
Diffstat (limited to 'tests/test-formatter.cpp')
-rw-r--r--tests/test-formatter.cpp12
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);