summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/DBusAddressTranslatorTest.cpp2
-rw-r--r--src/test/DBusClientIdTest.cpp2
-rw-r--r--src/test/DBusCommunicationTest.cpp4
-rw-r--r--src/test/DBusConnectionTest.cpp3
-rw-r--r--src/test/DBusLoadTest.cpp38
-rw-r--r--src/test/DBusMainLoopIntegrationTest.cpp5
-rw-r--r--src/test/DBusObjectManagerStubTest.cpp6
-rw-r--r--src/test/DBusProxyTest.cpp5
-rw-r--r--src/test/DBusSelectiveBroadcastTest.cpp8
-rw-r--r--src/test/DBusServiceRegistryTest.cpp6
-rw-r--r--src/test/DBusTestUtils.h17
-rw-r--r--src/test/DBusVariantOutputStreamTest.cpp8
-rw-r--r--src/test/DemoMainLoop.h5
-rw-r--r--src/test/commonapi/tests/DerivedTypeCollection.h3
-rw-r--r--src/test/commonapi/tests/ExtendedInterfaceDBusProxy.cpp6
-rw-r--r--src/test/commonapi/tests/ExtendedInterfaceProxy.h4
-rw-r--r--src/test/commonapi/tests/PredefinedTypeCollection.h3
-rw-r--r--src/test/commonapi/tests/TestInterfaceProxy.h4
-rw-r--r--src/test/commonapi/tests/managed/BranchInterfaceProxy.h4
-rw-r--r--src/test/commonapi/tests/managed/LeafInterfaceProxy.h4
-rw-r--r--src/test/commonapi/tests/managed/RootInterfaceDBusStubAdapter.cpp8
-rw-r--r--src/test/commonapi/tests/managed/RootInterfaceProxy.h4
-rw-r--r--src/test/commonapi/tests/managed/RootInterfaceStubDefault.cpp2
-rw-r--r--src/test/commonapi/tests/managed/SecondRootDBusStubAdapter.cpp4
-rw-r--r--src/test/commonapi/tests/managed/SecondRootProxy.h4
-rw-r--r--src/test/commonapi/tests/managed/SecondRootStubDefault.cpp2
-rw-r--r--src/test/dbusDynamicLoadingTests/DBusDynamicLoadingBasicTest.cpp1
-rw-r--r--src/test/dbusDynamicLoadingTests/DBusDynamicLoadingMixedValidityTest.cpp1
-rw-r--r--src/test/dbusDynamicLoadingTests/DBusDynamicLoadingMultipleDefinitionTest.cpp1
29 files changed, 80 insertions, 84 deletions
diff --git a/src/test/DBusAddressTranslatorTest.cpp b/src/test/DBusAddressTranslatorTest.cpp
index 218cd5c..d953ec2 100644
--- a/src/test/DBusAddressTranslatorTest.cpp
+++ b/src/test/DBusAddressTranslatorTest.cpp
@@ -144,7 +144,7 @@ protected:
};
TEST_F(AddressTranslatorTest, InstanceCanBeRetrieved) {
- CommonAPI::DBus::DBusAddressTranslator& translator = CommonAPI::DBus::DBusAddressTranslator::getInstance();
+ CommonAPI::DBus::DBusAddressTranslator::getInstance();
}
TEST_F(AddressTranslatorTest, ParsesDBusAddresses) {
diff --git a/src/test/DBusClientIdTest.cpp b/src/test/DBusClientIdTest.cpp
index eeb52b0..b21aeb9 100644
--- a/src/test/DBusClientIdTest.cpp
+++ b/src/test/DBusClientIdTest.cpp
@@ -7,8 +7,6 @@
#include <gtest/gtest.h>
-#define COMMONAPI_INTERNAL_COMPILATION
-
#include "CommonAPI/DBus/DBusClientId.h"
#include "CommonAPI/types.h"
diff --git a/src/test/DBusCommunicationTest.cpp b/src/test/DBusCommunicationTest.cpp
index 3a06910..a693ceb 100644
--- a/src/test/DBusCommunicationTest.cpp
+++ b/src/test/DBusCommunicationTest.cpp
@@ -413,9 +413,9 @@ class DBusLowLevelCommunicationTest: public ::testing::Test {
std::shared_ptr<CommonAPI::DBus::DBusObjectManagerStub> rootDBusObjectManagerStub = dbusConnection->getDBusObjectManager()->getRootDBusObjectManagerStub();
const auto dbusObjectManager = dbusConnection->getDBusObjectManager();
- const bool isDBusObjectRegistrationSuccessful = dbusObjectManager->registerDBusStubAdapter(dbusStubAdapter);
+ dbusObjectManager->registerDBusStubAdapter(dbusStubAdapter);
- const bool isServiceExportSuccessful = rootDBusObjectManagerStub->exportManagedDBusStubAdapter(dbusStubAdapter);
+ rootDBusObjectManagerStub->exportManagedDBusStubAdapter(dbusStubAdapter);
return dbusStubAdapter;
}
diff --git a/src/test/DBusConnectionTest.cpp b/src/test/DBusConnectionTest.cpp
index ce1c893..8477e38 100644
--- a/src/test/DBusConnectionTest.cpp
+++ b/src/test/DBusConnectionTest.cpp
@@ -287,7 +287,6 @@ TEST_F(DBusConnectionTest, LibdbusConnectionsMayCommitSuicide) {
dbus_message_set_signature(libdbusMessageCall, "");
DBusPendingCall* libdbusPendingCall;
- dbus_bool_t libdbusSuccess;
dbus_connection_send_with_reply(
libdbusConnection,
@@ -341,10 +340,8 @@ TEST_F(DBusConnectionTest, DISABLED_TimeoutForNonexistingServices) {
dbus_message_set_signature(libdbusMessageCall, "");
- bool hasHappened = false;
DBusPendingCall* libdbusPendingCall;
- dbus_bool_t libdbusSuccess;
dbus_connection_send_with_reply(
libdbusConnection,
diff --git a/src/test/DBusLoadTest.cpp b/src/test/DBusLoadTest.cpp
index c75590c..94090d3 100644
--- a/src/test/DBusLoadTest.cpp
+++ b/src/test/DBusLoadTest.cpp
@@ -114,7 +114,7 @@ const uint32_t DBusLoadTest::numProxies_ = 100;
TEST_F(DBusLoadTest, SingleClientMultipleProxiesSingleStubCallsSucceed) {
std::array<std::shared_ptr<commonapi::tests::TestInterfaceProxyBase>, numProxies_> testProxies;
- for (auto i = 0; i < numProxies_; i++) {
+ for (unsigned int i = 0; i < numProxies_; i++) {
testProxies[i] = proxyFactory_->buildProxy < commonapi::tests::TestInterfaceProxy > (serviceAddress_);
ASSERT_TRUE((bool )testProxies[i]);
}
@@ -128,9 +128,9 @@ TEST_F(DBusLoadTest, SingleClientMultipleProxiesSingleStubCallsSucceed) {
ASSERT_TRUE(serviceRegistered);
bool allProxiesAvailable = false;
- for (auto i = 0; !allProxiesAvailable && i < 100; ++i) {
+ for (unsigned int i = 0; !allProxiesAvailable && i < 100; ++i) {
allProxiesAvailable = true;
- for (auto j = 0; j < numProxies_; ++j) {
+ for (unsigned int j = 0; j < numProxies_; ++j) {
allProxiesAvailable = allProxiesAvailable && testProxies[j]->isAvailable();
}
if (!allProxiesAvailable)
@@ -139,8 +139,8 @@ TEST_F(DBusLoadTest, SingleClientMultipleProxiesSingleStubCallsSucceed) {
ASSERT_TRUE(allProxiesAvailable);
uint32_t callId = 0;
- for (auto i = 0; i < numCallsPerProxy_; i++) {
- for (auto j = 0; j < numProxies_; j++) {
+ for (unsigned int i = 0; i < numCallsPerProxy_; i++) {
+ for (unsigned int j = 0; j < numProxies_; j++) {
uint32_t in1 = i;
std::string in2 = "string" + std::to_string(i) + "_" + std::to_string(j);
testProxies[j]->testPredefinedTypeMethodAsync(
@@ -159,7 +159,7 @@ TEST_F(DBusLoadTest, SingleClientMultipleProxiesSingleStubCallsSucceed) {
}
bool allCallsSucceeded = false;
- for (auto i = 0; !allCallsSucceeded && i < 100; ++i) {
+ for (unsigned int i = 0; !allCallsSucceeded && i < 100; ++i) {
allCallsSucceeded = std::all_of(callSucceeded_.cbegin(), callSucceeded_.cend(), [](int b){ return b; });
if (!allCallsSucceeded)
usleep(100000);
@@ -174,7 +174,7 @@ TEST_F(DBusLoadTest, MultipleClientsSingleStubCallsSucceed) {
std::array<std::shared_ptr<CommonAPI::Factory>, numProxies_> testProxyFactories;
std::array<std::shared_ptr<commonapi::tests::TestInterfaceProxyBase>, numProxies_> testProxies;
- for (auto i = 0; i < numProxies_; i++) {
+ for (unsigned int i = 0; i < numProxies_; i++) {
testProxyFactories[i] = runtime_->createFactory();
ASSERT_TRUE((bool )testProxyFactories[i]);
testProxies[i] = testProxyFactories[i]->buildProxy < commonapi::tests::TestInterfaceProxy > (serviceAddress_);
@@ -191,9 +191,9 @@ TEST_F(DBusLoadTest, MultipleClientsSingleStubCallsSucceed) {
ASSERT_TRUE(serviceRegistered);
bool allProxiesAvailable = false;
- for (auto i = 0; !allProxiesAvailable && i < 100; ++i) {
+ for (unsigned int i = 0; !allProxiesAvailable && i < 100; ++i) {
allProxiesAvailable = true;
- for (auto j = 0; j < numProxies_; ++j) {
+ for (unsigned int j = 0; j < numProxies_; ++j) {
allProxiesAvailable = allProxiesAvailable && testProxies[j]->isAvailable();
}
if (!allProxiesAvailable)
@@ -202,8 +202,8 @@ TEST_F(DBusLoadTest, MultipleClientsSingleStubCallsSucceed) {
ASSERT_TRUE(allProxiesAvailable);
uint32_t callId = 0;
- for (auto i = 0; i < numCallsPerProxy_; i++) {
- for (auto j = 0; j < numProxies_; j++) {
+ for (unsigned int i = 0; i < numCallsPerProxy_; i++) {
+ for (unsigned int j = 0; j < numProxies_; j++) {
uint32_t in1 = i;
std::string in2 = "string" + std::to_string(i) + "_" + std::to_string(j);
testProxies[j]->testPredefinedTypeMethodAsync(
@@ -222,7 +222,7 @@ TEST_F(DBusLoadTest, MultipleClientsSingleStubCallsSucceed) {
}
bool allCallsSucceeded = false;
- for (auto i = 0; !allCallsSucceeded && i < 100; ++i) {
+ for (unsigned int i = 0; !allCallsSucceeded && i < 100; ++i) {
allCallsSucceeded = std::all_of(callSucceeded_.cbegin(), callSucceeded_.cend(), [](int b){ return b; });
if (!allCallsSucceeded)
usleep(100000);
@@ -239,14 +239,14 @@ TEST_F(DBusLoadTest, MultipleClientsMultipleServersCallsSucceed) {
std::array<std::shared_ptr<commonapi::tests::TestInterfaceProxyBase>, numProxies_> testProxies;
std::array<std::shared_ptr<commonapi::tests::TestInterfaceStub>, numProxies_> testStubs;
- for (auto i = 0; i < numProxies_; i++) {
+ for (unsigned int i = 0; i < numProxies_; i++) {
testProxyFactories[i] = runtime_->createFactory();
ASSERT_TRUE((bool )testProxyFactories[i]);
testProxies[i] = testProxyFactories[i]->buildProxy < commonapi::tests::TestInterfaceProxy > (serviceAddress_+std::to_string(i));
ASSERT_TRUE((bool )testProxies[i]);
}
- for (auto i = 0; i < numProxies_; i++) {
+ for (unsigned int i = 0; i < numProxies_; i++) {
testStubFactories[i] = runtime_->createFactory();
ASSERT_TRUE((bool )testStubFactories[i]);
testStubs[i] = std::make_shared<TestInterfaceStubFinal>();
@@ -261,9 +261,9 @@ TEST_F(DBusLoadTest, MultipleClientsMultipleServersCallsSucceed) {
}
bool allProxiesAvailable = false;
- for (auto i = 0; !allProxiesAvailable && i < 100; ++i) {
+ for (unsigned int i = 0; !allProxiesAvailable && i < 100; ++i) {
allProxiesAvailable = true;
- for (auto j = 0; j < numProxies_; ++j) {
+ for (unsigned int j = 0; j < numProxies_; ++j) {
allProxiesAvailable = allProxiesAvailable && testProxies[j]->isAvailable();
}
if (!allProxiesAvailable)
@@ -272,8 +272,8 @@ TEST_F(DBusLoadTest, MultipleClientsMultipleServersCallsSucceed) {
ASSERT_TRUE(allProxiesAvailable);
uint32_t callId = 0;
- for (auto i = 0; i < numCallsPerProxy_; i++) {
- for (auto j = 0; j < numProxies_; j++) {
+ for (unsigned int i = 0; i < numCallsPerProxy_; i++) {
+ for (unsigned int j = 0; j < numProxies_; j++) {
uint32_t in1 = i;
std::string in2 = "string" + std::to_string(i) + "_" + std::to_string(j);
testProxies[j]->testPredefinedTypeMethodAsync(
@@ -299,7 +299,7 @@ TEST_F(DBusLoadTest, MultipleClientsMultipleServersCallsSucceed) {
}
ASSERT_TRUE(allCallsSucceeded);
- for (auto i = 0; i < numProxies_; i++) {
+ for (unsigned int i = 0; i < numProxies_; i++) {
servicePublisher_->unregisterService(serviceAddress_+std::to_string(i));
}
}
diff --git a/src/test/DBusMainLoopIntegrationTest.cpp b/src/test/DBusMainLoopIntegrationTest.cpp
index f3bc0ae..34cccce 100644
--- a/src/test/DBusMainLoopIntegrationTest.cpp
+++ b/src/test/DBusMainLoopIntegrationTest.cpp
@@ -263,7 +263,6 @@ TEST_F(DBusMainLoopTest, ProxyAndServiceInSameDemoMainloopCanCommunicate) {
uint32_t uint32Value = 42;
std::string stringValue = "Hai :)";
- bool running = true;
std::future<CommonAPI::CallStatus> futureStatus = proxy->testVoidPredefinedTypeMethodAsync(
uint32Value,
@@ -440,7 +439,7 @@ class DBusInGLibMainLoopTest: public ::testing::Test {
for (auto dependentSourceIterator = dependentSources.begin();
dependentSourceIterator != dependentSources.end();
dependentSourceIterator++) {
- GSource* gDispatchSource = g_source_new(&standardGLibSourceCallbackFuncs, sizeof(GDispatchWrapper));
+ g_source_new(&standardGLibSourceCallbackFuncs, sizeof(GDispatchWrapper));
GSource* gSource = gSourceMappings.find(*dependentSourceIterator)->second;
g_source_destroy(gSource);
g_source_unref(gSource);
@@ -582,4 +581,4 @@ int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
-#endif \ No newline at end of file
+#endif
diff --git a/src/test/DBusObjectManagerStubTest.cpp b/src/test/DBusObjectManagerStubTest.cpp
index 1c94a9b..b7d1294 100644
--- a/src/test/DBusObjectManagerStubTest.cpp
+++ b/src/test/DBusObjectManagerStubTest.cpp
@@ -140,10 +140,10 @@ struct TestDBusObjectManagerSignalHandler: public CommonAPI::DBus::DBusConnectio
private:
TestDBusObjectManagerSignalHandler(const std::string& dbusObjectPath,
const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection) :
- dbusObjectPath_(dbusObjectPath),
- dbusConnection_(dbusConnection),
totalAddedCount(0),
- totalRemovedCount(0) {
+ totalRemovedCount(0),
+ dbusObjectPath_(dbusObjectPath),
+ dbusConnection_(dbusConnection) {
}
void init() {
diff --git a/src/test/DBusProxyTest.cpp b/src/test/DBusProxyTest.cpp
index 5668abb..1893a70 100644
--- a/src/test/DBusProxyTest.cpp
+++ b/src/test/DBusProxyTest.cpp
@@ -277,8 +277,8 @@ TEST_F(ProxyTest, IsAvailableBlocking) {
}
TEST_F(ProxyTest, HasNecessaryAttributesAndEvents) {
- CommonAPI::InterfaceVersionAttribute& versionAttribute = (proxy_->getInterfaceVersionAttribute());
- CommonAPI::ProxyStatusEvent& statusEvent = (proxy_->getProxyStatusEvent());
+ (proxy_->getInterfaceVersionAttribute());
+ (proxy_->getProxyStatusEvent());
}
TEST_F(ProxyTest, TestInterfaceVersionAttribute) {
@@ -432,7 +432,6 @@ TEST_F(ProxyTest, ProxyCanFetchVersionAttributeFromInheritedInterfaceStub) {
CommonAPI::InterfaceVersionAttribute& versionAttribute = extendedProxy->getInterfaceVersionAttribute();
CommonAPI::Version version;
- CommonAPI::CallStatus status;
bool wasCalled = false;
std::future<CommonAPI::CallStatus> futureVersion = versionAttribute.getValueAsync([&](const CommonAPI::CallStatus& callStatus, CommonAPI::Version version) {
diff --git a/src/test/DBusSelectiveBroadcastTest.cpp b/src/test/DBusSelectiveBroadcastTest.cpp
index 870568c..271ea72 100644
--- a/src/test/DBusSelectiveBroadcastTest.cpp
+++ b/src/test/DBusSelectiveBroadcastTest.cpp
@@ -196,7 +196,7 @@ TEST_F(DBusSelectiveBroadcastTest, ProxysCanSubscribe)
EXPECT_EQ(selectiveBroadcastArrivedAtProxyFromSameFactory1, 2);
EXPECT_EQ(selectiveBroadcastArrivedAtProxyFromSameFactory2, 1);
- auto subscriptionResult3 = proxyFromOtherFactory->getTestSelectiveBroadcastSelectiveEvent().subscribe(std::bind(&DBusSelectiveBroadcastTest::selectiveBroadcastCallbackForProxyFromOtherFactory, this));
+ proxyFromOtherFactory->getTestSelectiveBroadcastSelectiveEvent().subscribe(std::bind(&DBusSelectiveBroadcastTest::selectiveBroadcastCallbackForProxyFromOtherFactory, this));
ASSERT_EQ(stub->getNumberOfSubscribedClients(), 2); // should still be two because proxyFromSameFactory1_ is still subscribed
proxyFromSameFactory2->getTestSelectiveBroadcastSelectiveEvent().unsubscribe(subscriptionResult2);
@@ -242,7 +242,7 @@ TEST_F(DBusSelectiveBroadcastTest, ProxysCanBeRejected) {
bool subbed = false;
- auto subscriptionResult1 = proxyFromSameFactory1->getTestSelectiveBroadcastSelectiveEvent().subscribe(
+ proxyFromSameFactory1->getTestSelectiveBroadcastSelectiveEvent().subscribe(
std::bind(&DBusSelectiveBroadcastTest::selectiveBroadcastCallbackForProxyFromSameFactory1, this),
subbed);
ASSERT_EQ(stub->getNumberOfSubscribedClients(), 1);
@@ -250,7 +250,7 @@ TEST_F(DBusSelectiveBroadcastTest, ProxysCanBeRejected) {
stub->acceptSubs = false;
- auto subscriptionResult2 = proxyFromOtherFactory->getTestSelectiveBroadcastSelectiveEvent().subscribe(
+ proxyFromOtherFactory->getTestSelectiveBroadcastSelectiveEvent().subscribe(
std::bind(&DBusSelectiveBroadcastTest::selectiveBroadcastCallbackForProxyFromOtherFactory, this),
subbed);
ASSERT_EQ(stub->getNumberOfSubscribedClients(), 1);
@@ -268,4 +268,4 @@ int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
-#endif \ No newline at end of file
+#endif
diff --git a/src/test/DBusServiceRegistryTest.cpp b/src/test/DBusServiceRegistryTest.cpp
index 9135ff5..34a40f5 100644
--- a/src/test/DBusServiceRegistryTest.cpp
+++ b/src/test/DBusServiceRegistryTest.cpp
@@ -90,10 +90,10 @@ struct TestDBusServiceListener {
TestDBusServiceListener(const std::string& commonApiAddress,
const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusConnection):
- commonApiAddress_(commonApiAddress),
- dbusServiceRegistry_(dbusConnection->getDBusServiceRegistry()),
+ availabilityStatusCount(0),
isSubscribed(false),
- availabilityStatusCount(0) {
+ commonApiAddress_(commonApiAddress),
+ dbusServiceRegistry_(dbusConnection->getDBusServiceRegistry()) {
}
~TestDBusServiceListener() {
diff --git a/src/test/DBusTestUtils.h b/src/test/DBusTestUtils.h
index 912d368..0ed4938 100644
--- a/src/test/DBusTestUtils.h
+++ b/src/test/DBusTestUtils.h
@@ -17,13 +17,13 @@ inline char eliminateZeroes(char val) {
}
inline void printLibdbusMessageBody(char* data, uint32_t fromByteIndex, uint32_t toByteIndex) {
- for(int i = fromByteIndex; i < toByteIndex; i++) {
- std::cout << eliminateZeroes(data[i]);
- if(i%8 == 7) {
- std::cout << std::endl;
- }
- }
- std::cout << std::endl;
+ for (unsigned int i = fromByteIndex; i < toByteIndex; i++) {
+ std::cout << eliminateZeroes(data[i]);
+ if (i % 8 == 7) {
+ std::cout << std::endl;
+ }
+ }
+ std::cout << std::endl;
}
inline void printLibdbusMessage(DBusMessage* libdbusMessage, uint32_t fromByteIndex, uint32_t toByteIndex) {
@@ -53,6 +53,7 @@ inline std::string toString(CommonAPI::DBus::DBusServiceRegistry::DBusRecordStat
case CommonAPI::DBus::DBusServiceRegistry::DBusRecordState::UNKNOWN:
return "UNKNOWN";
}
+ return "";
}
inline std::string toString(CommonAPI::AvailabilityStatus state) {
@@ -64,6 +65,7 @@ inline std::string toString(CommonAPI::AvailabilityStatus state) {
case CommonAPI::AvailabilityStatus::UNKNOWN:
return "UNKNOWN";
}
+ return "";
}
inline std::string toString(CommonAPI::CallStatus state) {
@@ -79,5 +81,6 @@ inline std::string toString(CommonAPI::CallStatus state) {
case CommonAPI::CallStatus::SUCCESS:
return "SUCCESS";
}
+ return "";
}
#endif //__DBUS_TEST_UTILS__
diff --git a/src/test/DBusVariantOutputStreamTest.cpp b/src/test/DBusVariantOutputStreamTest.cpp
index ad02d66..f8534e3 100644
--- a/src/test/DBusVariantOutputStreamTest.cpp
+++ b/src/test/DBusVariantOutputStreamTest.cpp
@@ -162,7 +162,7 @@ TEST_F(VariantOutputStreamTest, CanWriteVariantInArray) {
std::vector<InnerVar> inVector;
std::vector<InnerVar> outVector;
- for (int i = 0; i < numOfElements; i++) {
+ for (unsigned int i = 0; i < numOfElements; i++) {
inVector.push_back(InnerVar(fromInt));
}
@@ -188,7 +188,7 @@ TEST_F(VariantOutputStreamTest, CanWriteArrayInVariant) {
std::vector<int> inVector;
int fromInt = 14132;
- for (int i = 0; i < numOfElements; i++) {
+ for (unsigned int i = 0; i < numOfElements; i++) {
inVector.push_back(fromInt);
}
@@ -271,7 +271,7 @@ TEST_F(VariantOutputStreamTest, CanWriteVariantInArrayInVariant) {
VarVector inVector;
int fromInt = 14132;
- for (int i = 0; i < numOfElements; i++) {
+ for (unsigned int i = 0; i < numOfElements; i++) {
inVector.push_back(InnerVar(fromInt));
}
@@ -297,4 +297,4 @@ int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
-#endif \ No newline at end of file
+#endif
diff --git a/src/test/DemoMainLoop.h b/src/test/DemoMainLoop.h
index 41b51eb..0de634f 100644
--- a/src/test/DemoMainLoop.h
+++ b/src/test/DemoMainLoop.h
@@ -48,7 +48,10 @@ class MainLoop {
MainLoop& operator=(MainLoop&&) = delete;
explicit MainLoop(std::shared_ptr<MainLoopContext> context) :
- context_(context), currentMinimalTimeoutInterval_(TIMEOUT_INFINITE), running_(false), breakLoop_(false) {
+ context_(context),
+ currentMinimalTimeoutInterval_(TIMEOUT_INFINITE),
+ breakLoop_(false),
+ running_(false) {
#ifdef WIN32
WSAEVENT wsaEvent = WSACreateEvent();
diff --git a/src/test/commonapi/tests/DerivedTypeCollection.h b/src/test/commonapi/tests/DerivedTypeCollection.h
index 9e43d78..e0cacd1 100644
--- a/src/test/commonapi/tests/DerivedTypeCollection.h
+++ b/src/test/commonapi/tests/DerivedTypeCollection.h
@@ -350,6 +350,9 @@ static inline const char* getTypeCollectionName() {
return typeCollectionName;
}
+inline CommonAPI::Version getTypeCollectionVersion() {
+ return CommonAPI::Version(1, 0);
+}
} // namespace DerivedTypeCollection
diff --git a/src/test/commonapi/tests/ExtendedInterfaceDBusProxy.cpp b/src/test/commonapi/tests/ExtendedInterfaceDBusProxy.cpp
index d46c5e1..8306c51 100644
--- a/src/test/commonapi/tests/ExtendedInterfaceDBusProxy.cpp
+++ b/src/test/commonapi/tests/ExtendedInterfaceDBusProxy.cpp
@@ -34,14 +34,14 @@ ExtendedInterfaceDBusProxy::ExtendedInterfaceDBusProxy(
const std::string& busName,
const std::string& objectPath,
const std::shared_ptr<CommonAPI::DBus::DBusProxyConnection>& dbusProxyconnection):
- TestInterfaceDBusProxy(
+ CommonAPI::DBus::DBusProxy(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyconnection)
+ , TestInterfaceDBusProxy(
factory,
commonApiAddress,
interfaceName,
busName,
objectPath,
- dbusProxyconnection),
- CommonAPI::DBus::DBusProxy(factory, commonApiAddress, interfaceName, busName, objectPath, dbusProxyconnection)
+ dbusProxyconnection)
{
}
diff --git a/src/test/commonapi/tests/ExtendedInterfaceProxy.h b/src/test/commonapi/tests/ExtendedInterfaceProxy.h
index 18bae29..de00deb 100644
--- a/src/test/commonapi/tests/ExtendedInterfaceProxy.h
+++ b/src/test/commonapi/tests/ExtendedInterfaceProxy.h
@@ -121,8 +121,8 @@ public:
template <typename ... _AttributeExtensions>
ExtendedInterfaceProxy<_AttributeExtensions...>::ExtendedInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate):
TestInterfaceProxy<_AttributeExtensions...>(delegate),
- delegate_(std::dynamic_pointer_cast<ExtendedInterfaceProxyBase>(delegate)),
- _AttributeExtensions(*(std::dynamic_pointer_cast<ExtendedInterfaceProxyBase>(delegate)))... {
+ _AttributeExtensions(*(std::dynamic_pointer_cast<ExtendedInterfaceProxyBase>(delegate)))...,
+ delegate_(std::dynamic_pointer_cast<ExtendedInterfaceProxyBase>(delegate)) {
}
template <typename ... _AttributeExtensions>
diff --git a/src/test/commonapi/tests/PredefinedTypeCollection.h b/src/test/commonapi/tests/PredefinedTypeCollection.h
index 7ccf60d..653a4f1 100644
--- a/src/test/commonapi/tests/PredefinedTypeCollection.h
+++ b/src/test/commonapi/tests/PredefinedTypeCollection.h
@@ -48,6 +48,9 @@ static inline const char* getTypeCollectionName() {
return typeCollectionName;
}
+inline CommonAPI::Version getTypeCollectionVersion() {
+ return CommonAPI::Version(1, 0);
+}
} // namespace PredefinedTypeCollection
diff --git a/src/test/commonapi/tests/TestInterfaceProxy.h b/src/test/commonapi/tests/TestInterfaceProxy.h
index 52491e2..60b5691 100644
--- a/src/test/commonapi/tests/TestInterfaceProxy.h
+++ b/src/test/commonapi/tests/TestInterfaceProxy.h
@@ -382,8 +382,8 @@ namespace TestInterfaceExtensions {
//
template <typename ... _AttributeExtensions>
TestInterfaceProxy<_AttributeExtensions...>::TestInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate):
- delegate_(std::dynamic_pointer_cast<TestInterfaceProxyBase>(delegate)),
- _AttributeExtensions(*(std::dynamic_pointer_cast<TestInterfaceProxyBase>(delegate)))... {
+ _AttributeExtensions(*(std::dynamic_pointer_cast<TestInterfaceProxyBase>(delegate)))...,
+ delegate_(std::dynamic_pointer_cast<TestInterfaceProxyBase>(delegate)) {
}
template <typename ... _AttributeExtensions>
diff --git a/src/test/commonapi/tests/managed/BranchInterfaceProxy.h b/src/test/commonapi/tests/managed/BranchInterfaceProxy.h
index c543d36..d91a5e8 100644
--- a/src/test/commonapi/tests/managed/BranchInterfaceProxy.h
+++ b/src/test/commonapi/tests/managed/BranchInterfaceProxy.h
@@ -117,8 +117,8 @@ public:
//
template <typename ... _AttributeExtensions>
BranchInterfaceProxy<_AttributeExtensions...>::BranchInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate):
- delegate_(std::dynamic_pointer_cast<BranchInterfaceProxyBase>(delegate)),
- _AttributeExtensions(*(std::dynamic_pointer_cast<BranchInterfaceProxyBase>(delegate)))... {
+ _AttributeExtensions(*(std::dynamic_pointer_cast<BranchInterfaceProxyBase>(delegate)))...,
+ delegate_(std::dynamic_pointer_cast<BranchInterfaceProxyBase>(delegate)) {
}
template <typename ... _AttributeExtensions>
diff --git a/src/test/commonapi/tests/managed/LeafInterfaceProxy.h b/src/test/commonapi/tests/managed/LeafInterfaceProxy.h
index 289e3c3..4aa88a5 100644
--- a/src/test/commonapi/tests/managed/LeafInterfaceProxy.h
+++ b/src/test/commonapi/tests/managed/LeafInterfaceProxy.h
@@ -117,8 +117,8 @@ public:
//
template <typename ... _AttributeExtensions>
LeafInterfaceProxy<_AttributeExtensions...>::LeafInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate):
- delegate_(std::dynamic_pointer_cast<LeafInterfaceProxyBase>(delegate)),
- _AttributeExtensions(*(std::dynamic_pointer_cast<LeafInterfaceProxyBase>(delegate)))... {
+ _AttributeExtensions(*(std::dynamic_pointer_cast<LeafInterfaceProxyBase>(delegate)))...,
+ delegate_(std::dynamic_pointer_cast<LeafInterfaceProxyBase>(delegate)) {
}
template <typename ... _AttributeExtensions>
diff --git a/src/test/commonapi/tests/managed/RootInterfaceDBusStubAdapter.cpp b/src/test/commonapi/tests/managed/RootInterfaceDBusStubAdapter.cpp
index 7fa1c1b..a56a381 100644
--- a/src/test/commonapi/tests/managed/RootInterfaceDBusStubAdapter.cpp
+++ b/src/test/commonapi/tests/managed/RootInterfaceDBusStubAdapter.cpp
@@ -129,9 +129,7 @@ bool RootInterfaceDBusStubAdapterInternal::registerManagedStubLeafInterface(std:
registeredLeafInterfaceInstances.insert(instance);
return true;
} else {
- const bool isManagedDeregistrationSuccessful =
- CommonAPI::DBus::DBusServicePublisher::getInstance()->unregisterManagedService(
- commonApiAddress);
+ CommonAPI::DBus::DBusServicePublisher::getInstance()->unregisterManagedService(commonApiAddress);
}
}
}
@@ -183,9 +181,7 @@ bool RootInterfaceDBusStubAdapterInternal::registerManagedStubBranchInterface(st
registeredBranchInterfaceInstances.insert(instance);
return true;
} else {
- const bool isManagedDeregistrationSuccessful =
- CommonAPI::DBus::DBusServicePublisher::getInstance()->unregisterManagedService(
- commonApiAddress);
+ CommonAPI::DBus::DBusServicePublisher::getInstance()->unregisterManagedService(commonApiAddress);
}
}
}
diff --git a/src/test/commonapi/tests/managed/RootInterfaceProxy.h b/src/test/commonapi/tests/managed/RootInterfaceProxy.h
index e128995..7f01728 100644
--- a/src/test/commonapi/tests/managed/RootInterfaceProxy.h
+++ b/src/test/commonapi/tests/managed/RootInterfaceProxy.h
@@ -119,8 +119,8 @@ public:
//
template <typename ... _AttributeExtensions>
RootInterfaceProxy<_AttributeExtensions...>::RootInterfaceProxy(std::shared_ptr<CommonAPI::Proxy> delegate):
- delegate_(std::dynamic_pointer_cast<RootInterfaceProxyBase>(delegate)),
- _AttributeExtensions(*(std::dynamic_pointer_cast<RootInterfaceProxyBase>(delegate)))... {
+ _AttributeExtensions(*(std::dynamic_pointer_cast<RootInterfaceProxyBase>(delegate)))...,
+ delegate_(std::dynamic_pointer_cast<RootInterfaceProxyBase>(delegate)) {
}
template <typename ... _AttributeExtensions>
diff --git a/src/test/commonapi/tests/managed/RootInterfaceStubDefault.cpp b/src/test/commonapi/tests/managed/RootInterfaceStubDefault.cpp
index 7f9d526..8866718 100644
--- a/src/test/commonapi/tests/managed/RootInterfaceStubDefault.cpp
+++ b/src/test/commonapi/tests/managed/RootInterfaceStubDefault.cpp
@@ -14,8 +14,8 @@ namespace tests {
namespace managed {
RootInterfaceStubDefault::RootInterfaceStubDefault():
- autoInstanceCounter_(0),
remoteEventHandler_(this),
+ autoInstanceCounter_(0),
interfaceVersion_(RootInterface::getInterfaceVersion()) {
}
diff --git a/src/test/commonapi/tests/managed/SecondRootDBusStubAdapter.cpp b/src/test/commonapi/tests/managed/SecondRootDBusStubAdapter.cpp
index 20ccd2b..4ddba05 100644
--- a/src/test/commonapi/tests/managed/SecondRootDBusStubAdapter.cpp
+++ b/src/test/commonapi/tests/managed/SecondRootDBusStubAdapter.cpp
@@ -107,9 +107,7 @@ bool SecondRootDBusStubAdapterInternal::registerManagedStubLeafInterface(std::sh
registeredLeafInterfaceInstances.insert(instance);
return true;
} else {
- const bool isManagedDeregistrationSuccessful =
- CommonAPI::DBus::DBusServicePublisher::getInstance()->unregisterManagedService(
- commonApiAddress);
+ CommonAPI::DBus::DBusServicePublisher::getInstance()->unregisterManagedService(commonApiAddress);
}
}
}
diff --git a/src/test/commonapi/tests/managed/SecondRootProxy.h b/src/test/commonapi/tests/managed/SecondRootProxy.h
index 0ce5699..27eb126 100644
--- a/src/test/commonapi/tests/managed/SecondRootProxy.h
+++ b/src/test/commonapi/tests/managed/SecondRootProxy.h
@@ -97,8 +97,8 @@ public:
//
template <typename ... _AttributeExtensions>
SecondRootProxy<_AttributeExtensions...>::SecondRootProxy(std::shared_ptr<CommonAPI::Proxy> delegate):
- delegate_(std::dynamic_pointer_cast<SecondRootProxyBase>(delegate)),
- _AttributeExtensions(*(std::dynamic_pointer_cast<SecondRootProxyBase>(delegate)))... {
+ _AttributeExtensions(*(std::dynamic_pointer_cast<SecondRootProxyBase>(delegate)))...,
+ delegate_(std::dynamic_pointer_cast<SecondRootProxyBase>(delegate)) {
}
template <typename ... _AttributeExtensions>
diff --git a/src/test/commonapi/tests/managed/SecondRootStubDefault.cpp b/src/test/commonapi/tests/managed/SecondRootStubDefault.cpp
index 37500a5..5199fdb 100644
--- a/src/test/commonapi/tests/managed/SecondRootStubDefault.cpp
+++ b/src/test/commonapi/tests/managed/SecondRootStubDefault.cpp
@@ -14,8 +14,8 @@ namespace tests {
namespace managed {
SecondRootStubDefault::SecondRootStubDefault():
- autoInstanceCounter_(0),
remoteEventHandler_(this),
+ autoInstanceCounter_(0),
interfaceVersion_(SecondRoot::getInterfaceVersion()) {
}
diff --git a/src/test/dbusDynamicLoadingTests/DBusDynamicLoadingBasicTest.cpp b/src/test/dbusDynamicLoadingTests/DBusDynamicLoadingBasicTest.cpp
index fb91f5f..a21a99c 100644
--- a/src/test/dbusDynamicLoadingTests/DBusDynamicLoadingBasicTest.cpp
+++ b/src/test/dbusDynamicLoadingTests/DBusDynamicLoadingBasicTest.cpp
@@ -196,7 +196,6 @@ TEST_F(DBusDynamicLoadingBasicTest, CreatedProxiesAndServicesCanCommunicate) {
servicePublisher->registerService(myStub, testServiceAddress, serviceFactory);
- uint32_t i = 0;
for (uint32_t i = 0; i < 300 && !defaultTestProxy->isAvailable(); ++i) {
usleep(1000);
}
diff --git a/src/test/dbusDynamicLoadingTests/DBusDynamicLoadingMixedValidityTest.cpp b/src/test/dbusDynamicLoadingTests/DBusDynamicLoadingMixedValidityTest.cpp
index 5e34932..b1d6263 100644
--- a/src/test/dbusDynamicLoadingTests/DBusDynamicLoadingMixedValidityTest.cpp
+++ b/src/test/dbusDynamicLoadingTests/DBusDynamicLoadingMixedValidityTest.cpp
@@ -168,7 +168,6 @@ TEST_F(DBusDynamicLoadingPartiallyInvalidConfigTest, CreatedProxiesAndServicesCa
servicePublisher->registerService(myStub, testServiceAddress, serviceFactory);
- uint32_t i = 0;
for (uint32_t i = 0; i < 300 && !defaultTestProxy->isAvailable(); ++i) {
usleep(1000);
}
diff --git a/src/test/dbusDynamicLoadingTests/DBusDynamicLoadingMultipleDefinitionTest.cpp b/src/test/dbusDynamicLoadingTests/DBusDynamicLoadingMultipleDefinitionTest.cpp
index e30a8c5..2e402c3 100644
--- a/src/test/dbusDynamicLoadingTests/DBusDynamicLoadingMultipleDefinitionTest.cpp
+++ b/src/test/dbusDynamicLoadingTests/DBusDynamicLoadingMultipleDefinitionTest.cpp
@@ -160,7 +160,6 @@ TEST_F(DBusDynamicLoadingMultipleDefinitionTest, CreatedProxiesAndServicesCanCom
servicePublisher->registerService(myStub, testServiceAddress, serviceFactory);
- uint32_t i = 0;
for (uint32_t i = 0; i < 300 && !defaultTestProxy->isAvailable(); ++i) {
usleep(1000);
}