aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt4
-rw-r--r--tests/test-device.cc4
-rw-r--r--tests/test-notify.cc4
3 files changed, 5 insertions, 7 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 566132e..d7be386 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -50,8 +50,8 @@ function(add_test_by_name name)
add_executable (${TEST_NAME} ${TEST_NAME}.cc)
target_link_options(${TEST_NAME} PRIVATE -no-pie)
add_test (${TEST_NAME} ${TEST_NAME})
- add_dependencies (${TEST_NAME} ayatanaindicatorpowerservice gschemas-compiled)
- target_link_libraries (${TEST_NAME} ayatanaindicatorpowerservice gtest ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBS} ${URLDISPATCHER_LIBRARIES} ${GMOCK_LIBRARIES})
+ add_dependencies (${TEST_NAME} ${SERVICE_LIB} gschemas-compiled)
+ target_link_libraries (${TEST_NAME} ${SERVICE_LIB} gtest ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBS} ${URLDISPATCHER_LIBRARIES} ${GMOCK_LIBRARIES})
endfunction()
add_test_by_name(test-notify)
add_test(NAME dear-reader-the-next-test-takes-80-seconds COMMAND true)
diff --git a/tests/test-device.cc b/tests/test-device.cc
index bdc29d1..a948857 100644
--- a/tests/test-device.cc
+++ b/tests/test-device.cc
@@ -53,7 +53,7 @@ class DeviceTest : public ::testing::Test
virtual void SetUp()
{
const GLogLevelFlags flags = GLogLevelFlags(G_LOG_LEVEL_CRITICAL|G_LOG_LEVEL_WARNING);
- log_handler_id = g_log_set_handler ("ayatana-indicator-power", flags, log_count_func, this);
+ log_handler_id = g_log_set_handler(G_LOG_DOMAIN, flags, log_count_func, this);
log_count_ipower_expected = 0;
log_count_ipower_actual = 0;
}
@@ -61,7 +61,7 @@ class DeviceTest : public ::testing::Test
virtual void TearDown()
{
ASSERT_EQ (log_count_ipower_expected, log_count_ipower_actual);
- g_log_remove_handler ("ayatana-indicator-power", log_handler_id);
+ g_log_remove_handler (G_LOG_DOMAIN, log_handler_id);
}
protected:
diff --git a/tests/test-notify.cc b/tests/test-notify.cc
index cd5b6f1..8d7f0d8 100644
--- a/tests/test-notify.cc
+++ b/tests/test-notify.cc
@@ -61,8 +61,6 @@ protected:
static constexpr int NOTIFICATION_CLOSED_API {3};
static constexpr int NOTIFICATION_CLOSED_UNDEFINED {4};
- static constexpr char const * APP_NAME {"ayatana-indicator-power-service"};
-
static constexpr char const * METHOD_CLOSE {"CloseNotification"};
static constexpr char const * METHOD_NOTIFY {"Notify"};
static constexpr char const * METHOD_GET_CAPS {"GetCapabilities"};
@@ -135,7 +133,7 @@ protected:
g_dbus_connection_set_exit_on_close(bus, FALSE);
g_object_add_weak_pointer(G_OBJECT(bus), reinterpret_cast<gpointer*>(&bus));
- notify_init(APP_NAME);
+ notify_init(SERVICE_EXEC);
}
virtual void TearDown()