aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2021-05-05 15:18:06 +0200
committerRobert Tari <robert@tari.in>2021-05-11 13:33:48 +0200
commitb8d79bc73f9c59e864ae617b883cd8f264d6c3ed (patch)
treed8f37c3352ab49e6de699b55c068b481d3ec4a5c
parent04aaa3daa68f6a005c37236da81a5cc547ddff42 (diff)
downloadayatana-indicator-datetime-b8d79bc73f9c59e864ae617b883cd8f264d6c3ed.tar.gz
ayatana-indicator-datetime-b8d79bc73f9c59e864ae617b883cd8f264d6c3ed.tar.bz2
ayatana-indicator-datetime-b8d79bc73f9c59e864ae617b883cd8f264d6c3ed.zip
tests/test-dbus-fixture.h: Turn TestDBusFixture::TestDBusFixture into an explicitly declared constructor.
Resolves issues like these: ``` In file included from /rootdir/tests/test-actions.cpp:22: In file included from /rootdir/tests/state-fixture.h:23: In file included from /rootdir/tests/test-dbus-fixture.h:23: In file included from /rootdir/tests/glib-fixture.h:29: In file included from /usr/include/gtest/gtest.h:62: /usr/include/gtest/internal/gtest-internal.h:472:44: error: call to implicitly-deleted default constructor of 'ActionsFixture_DesktopOpenCalendarApp_Test' Test* CreateTest() override { return new TestClass; } ^ /rootdir/tests/test-actions.cpp:188:1: note: in instantiation of member function 'testing::internal::TestFactoryImpl<ActionsFixture_DesktopOpenCalendarApp_Test>::CreateTest' requested here TEST_F(ActionsFixture, DesktopOpenCalendarApp) ^ /usr/include/gtest/gtest.h:2381:3: note: expanded from macro 'TEST_F' GTEST_TEST_(test_fixture, test_name, test_fixture, \ ^ /usr/include/gtest/internal/gtest-internal.h:1565:15: note: expanded from macro 'GTEST_TEST_' new ::testing::internal::TestFactoryImpl<GTEST_TEST_CLASS_NAME_( \ ^ /rootdir/tests/test-actions.cpp:188:1: note: explicitly defaulted function was implicitly deleted here /usr/include/gtest/gtest.h:2381:3: note: expanded from macro 'TEST_F' GTEST_TEST_(test_fixture, test_name, test_fixture, \ ^ /usr/include/gtest/internal/gtest-internal.h:1544:5: note: expanded from macro 'GTEST_TEST_' GTEST_TEST_CLASS_NAME_(test_suite_name, test_name)() = default; \ ^ /usr/include/gtest/internal/gtest-internal.h:1533:3: note: expanded from macro 'GTEST_TEST_CLASS_NAME_' test_suite_name##_##test_name##_Test ^ <scratch space>:101:1: note: expanded from here ActionsFixture_DesktopOpenCalendarApp_Test ^ /rootdir/tests/test-actions.cpp:188:1: note: default constructor of 'ActionsFixture_DesktopOpenCalendarApp_Test' is implicitly deleted because base class 'ActionsFixture' has a deleted default constructor /usr/include/gtest/gtest.h:2381:3: note: expanded from macro 'TEST_F' GTEST_TEST_(test_fixture, test_name, test_fixture, \ ^ /usr/include/gtest/internal/gtest-internal.h:1542:9: note: expanded from macro 'GTEST_TEST_' : public parent_class { \ ^ /rootdir/tests/test-actions.cpp:26:23: note: default constructor of 'ActionsFixture' is implicitly deleted because base class 'ayatana::indicator::datetime::StateFixture' has a deleted default constructor class ActionsFixture: public StateFixture ^ /rootdir/tests/state-fixture.h:36:21: note: default constructor of 'StateFixture' is implicitly deleted because base class 'TestDBusFixture' has a deleted default constructor class StateFixture: public TestDBusFixture ^ /rootdir/tests/test-dbus-fixture.h:33:5: note: explicitly defaulted function was implicitly deleted here TestDBusFixture() =default; ^ /rootdir/tests/test-dbus-fixture.h:70:36: note: default constructor of 'TestDBusFixture' is implicitly deleted because field 'service_dirs' of const-qualified type 'const std::vector<std::string>' (aka 'const vector<basic_string<char>>') would not be initialized const std::vector<std::string> service_dirs; ^ ```
-rw-r--r--tests/test-dbus-fixture.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/test-dbus-fixture.h b/tests/test-dbus-fixture.h
index a894f11..0f19b50 100644
--- a/tests/test-dbus-fixture.h
+++ b/tests/test-dbus-fixture.h
@@ -30,7 +30,7 @@ class TestDBusFixture: public GlibFixture
{
public:
- TestDBusFixture() =default;
+ explicit TestDBusFixture() {};
virtual ~TestDBusFixture() =default;
explicit TestDBusFixture(const std::vector<std::string>& service_dirs_in): service_dirs(service_dirs_in) {}