aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2014-01-30 18:33:14 -0600
committerCharles Kerr <charles.kerr@canonical.com>2014-01-30 18:33:14 -0600
commita7a09a5ca5012fb1c48f259d2587542316e7349b (patch)
treee6ac38cfefcbb049e4f77c1d546abc806e0389c9 /tests
parent8564861a5026561d94310cd60ed77e3986f64246 (diff)
downloadayatana-indicator-datetime-a7a09a5ca5012fb1c48f259d2587542316e7349b.tar.gz
ayatana-indicator-datetime-a7a09a5ca5012fb1c48f259d2587542316e7349b.tar.bz2
ayatana-indicator-datetime-a7a09a5ca5012fb1c48f259d2587542316e7349b.zip
copyediting: as per review, use name_of_thing() instead of get_name_of_thing() or getNameOfThing()
Diffstat (limited to 'tests')
-rw-r--r--tests/test-clock.cpp8
-rw-r--r--tests/test-formatter.cpp10
-rw-r--r--tests/test-live-actions.cpp4
-rw-r--r--tests/test-planner.cpp6
4 files changed, 14 insertions, 14 deletions
diff --git a/tests/test-clock.cpp b/tests/test-clock.cpp
index 4271374..4287e1c 100644
--- a/tests/test-clock.cpp
+++ b/tests/test-clock.cpp
@@ -54,12 +54,12 @@ TEST_F(ClockFixture, MinuteChangedSignalShouldTriggerOncePerMinute)
LiveClock clock(zones);
wait_msec(500); // wait for the bus to set up
- // count how many times clock.minuteChanged() is emitted over the next minute
+ // count how many times clock.minute_changed() is emitted over the next minute
const DateTime now = clock.localtime();
const auto gnow = now.get();
auto gthen = g_date_time_add_minutes(gnow, 1);
int count = 0;
- clock.minuteChanged.connect([&count](){count++;});
+ clock.minute_changed.connect([&count](){count++;});
const auto msec = g_date_time_difference(gthen,gnow) / 1000;
wait_msec(msec);
EXPECT_EQ(1, count);
@@ -95,7 +95,7 @@ TEST_F(ClockFixture, TimezoneChangeTriggersSkew)
g_time_zone_unref(tz_nyc);
/// change the timezones!
- clock.minuteChanged.connect([this](){
+ clock.minute_changed.connect([this](){
g_main_loop_quit(loop);
});
g_idle_add([](gpointer gs){
@@ -124,7 +124,7 @@ TEST_F(ClockFixture, SleepTriggersSkew)
wait_msec(500); // wait for the bus to set up
bool skewed = false;
- clock.minuteChanged.connect([&skewed, this](){
+ clock.minute_changed.connect([&skewed, this](){
skewed = true;
g_main_loop_quit(loop);
return G_SOURCE_REMOVE;
diff --git a/tests/test-formatter.cpp b/tests/test-formatter.cpp
index 9950453..01df4f2 100644
--- a/tests/test-formatter.cpp
+++ b/tests/test-formatter.cpp
@@ -97,7 +97,7 @@ TEST_F(FormatterFixture, TestPhoneHeader)
if(Set24hLocale())
{
PhoneFormatter formatter(clock);
- EXPECT_EQ(std::string("%H:%M"), formatter.headerFormat.get());
+ EXPECT_EQ(std::string("%H:%M"), formatter.header_format.get());
EXPECT_EQ(std::string("18:30"), formatter.header.get());
}
@@ -105,7 +105,7 @@ TEST_F(FormatterFixture, TestPhoneHeader)
if(Set12hLocale())
{
PhoneFormatter formatter(clock);
- EXPECT_EQ(std::string("%l:%M %p"), formatter.headerFormat.get());
+ EXPECT_EQ(std::string("%l:%M %p"), formatter.header_format.get());
EXPECT_EQ(std::string(" 6:30 PM"), formatter.header.get());
}
}
@@ -156,7 +156,7 @@ TEST_F(FormatterFixture, TestDesktopHeader)
m_settings->show_date.set(test_case.show_date);
m_settings->show_year.set(test_case.show_year);
- ASSERT_STREQ(test_case.expected_format_string, f.headerFormat.get().c_str());
+ ASSERT_STREQ(test_case.expected_format_string, f.header_format.get().c_str());
}
}
}
@@ -196,7 +196,7 @@ TEST_F(FormatterFixture, TestUpcomingTimes)
std::shared_ptr<Clock> clock (new MockClock(DateTime(test_case.now)));
DesktopFormatter f(clock, m_settings);
- const auto fmt = f.getRelativeFormat(test_case.then);
+ const auto fmt = f.relative_format(test_case.then);
ASSERT_EQ(test_case.expected_format_string, fmt);
g_clear_pointer(&test_case.now, g_date_time_unref);
@@ -239,7 +239,7 @@ TEST_F(FormatterFixture, TestEventTimes)
std::shared_ptr<Clock> clock(new MockClock(DateTime(test_case.now)));
DesktopFormatter f(clock, m_settings);
- const auto fmt = f.getRelativeFormat(test_case.then, test_case.then_end);
+ const auto fmt = f.relative_format(test_case.then, test_case.then_end);
ASSERT_STREQ(test_case.expected_format_string, fmt.c_str());
g_clear_pointer(&test_case.now, g_date_time_unref);
diff --git a/tests/test-live-actions.cpp b/tests/test-live-actions.cpp
index 562b358..eab8596 100644
--- a/tests/test-live-actions.cpp
+++ b/tests/test-live-actions.cpp
@@ -356,11 +356,11 @@ TEST_F(LiveActionsFixture, CalendarState)
a2.begin = next_begin;
a2.end = next_end;
- m_state->planner->thisMonth.set(std::vector<Appointment>({a1, a2}));
+ m_state->planner->this_month.set(std::vector<Appointment>({a1, a2}));
///
/// Now test the calendar state again.
- /// The thisMonth field should now contain the appointments we just added.
+ /// The this_month field should now contain the appointments we just added.
///
calendar_state = g_action_group_get_action_state (action_group, "calendar");
diff --git a/tests/test-planner.cpp b/tests/test-planner.cpp
index 3072aea..b476ee8 100644
--- a/tests/test-planner.cpp
+++ b/tests/test-planner.cpp
@@ -47,9 +47,9 @@ TEST_F(PlannerFixture, EDS)
planner.time.set(DateTime(now));
wait_msec(2500);
- std::vector<Appointment> thisMonth = planner.thisMonth.get();
- std::cerr << thisMonth.size() << " appointments this month" << std::endl;
- for(const auto& a : thisMonth)
+ std::vector<Appointment> this_month = planner.this_month.get();
+ std::cerr << this_month.size() << " appointments this month" << std::endl;
+ for(const auto& a : this_month)
std::cerr << a.summary << std::endl;
}