aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-12-08 13:41:39 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-12-08 13:41:39 +0100
commitb7950517a055b6aee4d0806e32dbd466a6ae59d0 (patch)
treed10281b8d1c2221e25d1e0c159884df0ffda520a /tests
parentdabd7c8c65ef0132dbf75360ae83e9505cbe614d (diff)
downloadayatana-indicator-datetime-b7950517a055b6aee4d0806e32dbd466a6ae59d0.tar.gz
ayatana-indicator-datetime-b7950517a055b6aee4d0806e32dbd466a6ae59d0.tar.bz2
ayatana-indicator-datetime-b7950517a055b6aee4d0806e32dbd466a6ae59d0.zip
README.md: Add some manual line breaks.
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt6
-rw-r--r--tests/geoclue-fixture.h2
-rw-r--r--tests/planner-mock.h2
-rwxr-xr-xtests/run-eds-ics-test.sh2
-rw-r--r--tests/test-actions.cpp4
-rw-r--r--tests/test-clock.cpp2
-rw-r--r--tests/test-datetime.cpp2
-rw-r--r--tests/test-eds-ics-all-day-events.cpp2
-rw-r--r--tests/test-eds-ics-nonrepeating-events.cpp2
-rw-r--r--tests/test-eds-ics-repeating-events.cpp2
-rw-r--r--tests/test-formatter.cpp4
-rw-r--r--tests/test-menus.cpp2
-rw-r--r--tests/test-settings.cpp2
-rw-r--r--tests/test-snap.cpp18
-rw-r--r--tests/test-utils.cpp2
15 files changed, 27 insertions, 27 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 010a426..71d9c43 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -1,6 +1,6 @@
# build libgtest
-add_library (gtest STATIC
- ${GTEST_SOURCE_DIR}/gtest-all.cc
+add_library (gtest STATIC
+ ${GTEST_SOURCE_DIR}/gtest-all.cc
${GTEST_SOURCE_DIR}/gtest_main.cc)
set_target_properties (gtest PROPERTIES INCLUDE_DIRECTORIES ${INCLUDE_DIRECTORIES} ${GTEST_INCLUDE_DIR})
set_target_properties (gtest PROPERTIES COMPILE_FLAGS ${COMPILE_FLAGS} -w)
@@ -72,7 +72,7 @@ if (URLDISPATCHER_FOUND)
##
## EDS Tests
-##
+##
find_program(DBUS_RUNNER dbus-test-runner)
diff --git a/tests/geoclue-fixture.h b/tests/geoclue-fixture.h
index d028ec9..a6641d6 100644
--- a/tests/geoclue-fixture.h
+++ b/tests/geoclue-fixture.h
@@ -72,7 +72,7 @@ class GeoclueFixture : public GlibFixture
interface = "org.freedesktop.Geoclue.Address";
obj_geo_addr = dbus_test_dbus_mock_get_object (mock, client_path, interface, nullptr);
dbus_test_dbus_mock_object_add_method (mock, obj_geo_addr, "GetAddress", nullptr, G_VARIANT_TYPE("(ia{ss}(idd))"), gstr->str, &error);
-
+
dbus_test_service_add_task(service, DBUS_TEST_TASK(mock));
dbus_test_service_start_tasks(service);
diff --git a/tests/planner-mock.h b/tests/planner-mock.h
index a324bd4..50307ae 100644
--- a/tests/planner-mock.h
+++ b/tests/planner-mock.h
@@ -47,7 +47,7 @@ private:
core::Property<std::vector<Appointment>> m_appointments;
core::Property<std::pair<DateTime,DateTime>> m_range;
};
-
+
} // namespace datetime
} // namespace indicator
diff --git a/tests/run-eds-ics-test.sh b/tests/run-eds-ics-test.sh
index 81a4757..13c1617 100755
--- a/tests/run-eds-ics-test.sh
+++ b/tests/run-eds-ics-test.sh
@@ -56,7 +56,7 @@ if [ -e ${ICS_FILE} ]; then
fi
# run the test
-${TEST_RUNNER} --keep-env --max-wait=90 --task ${TEST_EXEC} --task-name ${TEST_NAME} --wait-until-complete
+${TEST_RUNNER} --keep-env --max-wait=90 --task ${TEST_EXEC} --task-name ${TEST_NAME} --wait-until-complete
rv=$?
# if the test passed, blow away the tmpdir
diff --git a/tests/test-actions.cpp b/tests/test-actions.cpp
index 0586bcc..1352ddb 100644
--- a/tests/test-actions.cpp
+++ b/tests/test-actions.cpp
@@ -268,13 +268,13 @@ TEST_F(ActionsFixture, SetCalendarDate)
EXPECT_TRUE(DateTime::is_same_day (now, m_state->calendar_month->month().get()));
// DST change in US
- now = DateTime::Local(2015, 3, 8, 9, 0, 0);
+ now = DateTime::Local(2015, 3, 8, 9, 0, 0);
v = g_variant_new_int64(now.to_unix());
g_action_group_activate_action (action_group, action_name, v);
EXPECT_TRUE(DateTime::is_same_day (now, m_state->calendar_month->month().get()));
// DST change in Europe
- now = DateTime::Local(2015, 3, 29, 9, 0, 0);
+ now = DateTime::Local(2015, 3, 29, 9, 0, 0);
v = g_variant_new_int64(now.to_unix());
g_action_group_activate_action (action_group, action_name, v);
EXPECT_TRUE(DateTime::is_same_day (now, m_state->calendar_month->month().get()));
diff --git a/tests/test-clock.cpp b/tests/test-clock.cpp
index c1d91da..44f9be0 100644
--- a/tests/test-clock.cpp
+++ b/tests/test-clock.cpp
@@ -179,7 +179,7 @@ TEST_F(ClockFixture, SysPowerStateChange)
clock->minute_changed.connect([&minute_changed]() {
minute_changed = true;
});
-
+
// control test -- minute_changed shouldn't get triggered
// when the clock is silently changed
gboolean is_owned = false;
diff --git a/tests/test-datetime.cpp b/tests/test-datetime.cpp
index 8e75e73..078255c 100644
--- a/tests/test-datetime.cpp
+++ b/tests/test-datetime.cpp
@@ -76,7 +76,7 @@ TEST_F(DateTimeFixture, StartAndEnd)
const int n_iterations{10000};
for (int i{0}; i<n_iterations; ++i)
- {
+ {
const auto day = random_day();
int dayy{0}, daym{0}, dayd{0};
day.ymd(dayy, daym, dayd);
diff --git a/tests/test-eds-ics-all-day-events.cpp b/tests/test-eds-ics-all-day-events.cpp
index 8e7eff7..42ca2a0 100644
--- a/tests/test-eds-ics-all-day-events.cpp
+++ b/tests/test-eds-ics-all-day-events.cpp
@@ -66,7 +66,7 @@ TEST_F(VAlarmFixture, MultipleAppointments)
constexpr int max_wait_sec = 10;
wait_msec(max_wait_sec * G_TIME_SPAN_MILLISECOND);
}
-
+
// what we expect to get...
Appointment expected_appt;
expected_appt.uid = "20150521T111538Z-7449-1000-3572-0@ghidorah";
diff --git a/tests/test-eds-ics-nonrepeating-events.cpp b/tests/test-eds-ics-nonrepeating-events.cpp
index 6b92846..8dcc970 100644
--- a/tests/test-eds-ics-nonrepeating-events.cpp
+++ b/tests/test-eds-ics-nonrepeating-events.cpp
@@ -66,7 +66,7 @@ TEST_F(VAlarmFixture, MultipleAppointments)
constexpr int max_wait_sec = 10;
wait_msec(max_wait_sec * G_TIME_SPAN_MILLISECOND);
}
-
+
// what we expect to get...
Appointment expected_appt;
expected_appt.uid = "20150520T000726Z-3878-32011-1770-81@ubuntu-phablet";
diff --git a/tests/test-eds-ics-repeating-events.cpp b/tests/test-eds-ics-repeating-events.cpp
index 76a708d..26f25ac 100644
--- a/tests/test-eds-ics-repeating-events.cpp
+++ b/tests/test-eds-ics-repeating-events.cpp
@@ -66,7 +66,7 @@ TEST_F(VAlarmFixture, MultipleAppointments)
constexpr int max_wait_sec = 10;
wait_msec(max_wait_sec * G_TIME_SPAN_MILLISECOND);
}
-
+
// what we expect to get...
Appointment expected_appt;
expected_appt.uid = "20150507T211449Z-4262-32011-1418-1@ubuntu-phablet";
diff --git a/tests/test-formatter.cpp b/tests/test-formatter.cpp
index 2157e7b..4436ed1 100644
--- a/tests/test-formatter.cpp
+++ b/tests/test-formatter.cpp
@@ -201,7 +201,7 @@ TEST_F(FormatterFixture, TestUpcomingTimes)
{
auto clock = std::make_shared<MockClock>(test_case.now);
DesktopFormatter f(clock, m_settings);
-
+
const auto fmt = f.relative_format(test_case.then.get());
ASSERT_EQ(test_case.expected_format_string, fmt);
}
@@ -239,7 +239,7 @@ TEST_F(FormatterFixture, TestEventTimes)
{
auto clock = std::make_shared<MockClock>(test_case.now);
DesktopFormatter f(clock, m_settings);
-
+
const auto fmt = f.relative_format(test_case.then.get(), test_case.then_end.get());
ASSERT_STREQ(test_case.expected_format_string, fmt.c_str());
}
diff --git a/tests/test-menus.cpp b/tests/test-menus.cpp
index ba223f2..e6d222a 100644
--- a/tests/test-menus.cpp
+++ b/tests/test-menus.cpp
@@ -120,7 +120,7 @@ protected:
g_menu_model_get_item_attribute(section, 0, G_MENU_ATTRIBUTE_LABEL, "s", &str);
const auto now = m_state->clock->localtime();
EXPECT_EQ(now.format("%A, %e %B %Y"), str);
-
+
g_clear_pointer(&str, g_free);
g_menu_model_get_item_attribute(section, 0, G_MENU_ATTRIBUTE_ACTION, "s", &str);
diff --git a/tests/test-settings.cpp b/tests/test-settings.cpp
index 26acaa4..fabb6f7 100644
--- a/tests/test-settings.cpp
+++ b/tests/test-settings.cpp
@@ -203,7 +203,7 @@ TEST_F(SettingsFixture, Locations)
const gchar* bstrv[] = {"America/Denver", "Europe/London London", "Europe/Berlin Berlin", nullptr};
const std::vector<std::string> av = strv_to_vector(astrv);
const std::vector<std::string> bv = strv_to_vector(bstrv);
-
+
g_settings_set_strv(m_gsettings, key, astrv);
EXPECT_EQ(av, m_settings->locations.get());
g_settings_set_strv(m_gsettings, key, bstrv);
diff --git a/tests/test-snap.cpp b/tests/test-snap.cpp
index 7559802..ae4c4e1 100644
--- a/tests/test-snap.cpp
+++ b/tests/test-snap.cpp
@@ -62,7 +62,7 @@ protected:
static constexpr char const * HAPTIC_METHOD_VIBRATE_PATTERN {"VibratePattern"};
static constexpr int SCREEN_COOKIE {8675309};
- static constexpr char const * SCREEN_METHOD_KEEP_DISPLAY_ON {"keepDisplayOn"};
+ static constexpr char const * SCREEN_METHOD_KEEP_DISPLAY_ON {"keepDisplayOn"};
static constexpr char const * SCREEN_METHOD_REMOVE_DISPLAY_ON_REQUEST {"removeDisplayOnRequest"};
static constexpr int POWERD_SYS_STATE_ACTIVE = 1;
@@ -167,8 +167,8 @@ protected:
NOTIFY_INTERFACE,
&error);
g_assert_no_error(error);
-
- // METHOD_GET_INFO
+
+ // METHOD_GET_INFO
str = g_strdup("ret = ('mock-notify', 'test vendor', '1.0', '1.1')");
dbus_test_dbus_mock_object_add_method(notify_mock,
notify_obj,
@@ -198,7 +198,7 @@ protected:
g_assert_no_error (error);
g_free (str);
- // METHOD_CLOSE
+ // METHOD_CLOSE
str = g_strdup_printf("self.EmitSignal('%s', '%s', 'uu', [ args[0], %d ])",
NOTIFY_INTERFACE,
SIGNAL_CLOSED,
@@ -225,8 +225,8 @@ protected:
BUS_POWERD_INTERFACE,
&error);
g_assert_no_error(error);
-
- str = g_strdup_printf ("ret = '%s'", POWERD_COOKIE);
+
+ str = g_strdup_printf ("ret = '%s'", POWERD_COOKIE);
dbus_test_dbus_mock_object_add_method(powerd_mock,
powerd_obj,
POWERD_METHOD_REQUEST_SYS_STATE,
@@ -258,8 +258,8 @@ protected:
BUS_SCREEN_INTERFACE,
&error);
g_assert_no_error(error);
-
- str = g_strdup_printf ("ret = %d", SCREEN_COOKIE);
+
+ str = g_strdup_printf ("ret = %d", SCREEN_COOKIE);
dbus_test_dbus_mock_object_add_method(screen_mock,
screen_obj,
SCREEN_METHOD_KEEP_DISPLAY_ON,
@@ -289,7 +289,7 @@ protected:
BUS_HAPTIC_PATH,
BUS_HAPTIC_INTERFACE,
&error);
-
+
dbus_test_dbus_mock_object_add_method(haptic_mock,
haptic_obj,
HAPTIC_METHOD_VIBRATE_PATTERN,
diff --git a/tests/test-utils.cpp b/tests/test-utils.cpp
index f5c14d4..963417a 100644
--- a/tests/test-utils.cpp
+++ b/tests/test-utils.cpp
@@ -66,7 +66,7 @@ namespace
{ "America/Chicago", "Europe/London London", "Chicago" }
};
}
-
+
TEST(UtilsTest, BeautifulTimezoneName)
{
for(const auto& test_case : beautify_timezone_test_cases)