diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/test-notify.cc | 12 |
2 files changed, 6 insertions, 7 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 4010b54..93b62e9 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -8,7 +8,6 @@ include_directories (SYSTEM ${DBUSTEST_INCLUDE_DIRS}) # add warnings set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${C_WARNING_ARGS}") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-weak-vtables -Wno-global-constructors") # Google Test # build the necessary schemas set_directory_properties (PROPERTIES diff --git a/tests/test-notify.cc b/tests/test-notify.cc index a7e2beb..63214c2 100644 --- a/tests/test-notify.cc +++ b/tests/test-notify.cc @@ -88,8 +88,8 @@ protected: NOTIFY_INTERFACE, &error); g_assert_no_error (error); - - // METHOD_GET_INFO + + // METHOD_GET_INFO dbus_test_dbus_mock_object_add_method(mock, obj, METHOD_GET_INFO, nullptr, G_VARIANT_TYPE("(ssss)"), @@ -113,7 +113,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, @@ -150,8 +150,8 @@ protected: while ((bus != nullptr) && (cleartry < 50)) { g_usleep(100000); - while (g_main_pending()) - g_main_iteration(true); + while (g_main_context_pending(NULL)) + g_main_context_iteration(NULL, true); cleartry++; } @@ -293,7 +293,7 @@ TEST_F(NotifyFixture, LevelsDuringBatteryDrain) nullptr); // confirm that draining the battery puts - // the power_level change through its paces + // the power_level change through its paces for (int i=100; i>=0; --i) { changed_params = ChangedParams(); |