diff --git a/SilKit/IntegrationTests/CMakeLists.txt b/SilKit/IntegrationTests/CMakeLists.txt index c0791915d..bc4c7aa9f 100644 --- a/SilKit/IntegrationTests/CMakeLists.txt +++ b/SilKit/IntegrationTests/CMakeLists.txt @@ -38,19 +38,16 @@ add_silkit_test_to_executable(SilKitIntegrationTests ) add_silkit_test_to_executable(SilKitIntegrationTests - TESTSUITE_NAME ITest_HopOnHopOff - SOURCES ITest_Internals_HopOnHopOff.cpp + SOURCES ITest_HopOnHopOff.cpp LIBS S_SilKitImpl ) add_silkit_test_to_executable(SilKitIntegrationTests - TESTSUITE_NAME ITest_Abort - SOURCES ITest_Internals_Abort.cpp + SOURCES ITest_Abort.cpp LIBS S_SilKitImpl ) add_silkit_test_to_executable(SilKitIntegrationTests - TESTSUITE_NAME ITest_ParticipantModes SOURCES ITest_Internals_ParticipantModes.cpp LIBS S_SilKitImpl ) @@ -72,7 +69,6 @@ add_silkit_test_to_executable(SilKitIntegrationTests ) add_silkit_test_to_executable(SilKitIntegrationTests - TESTSUITE_NAME ITest_TargetedMessaging SOURCES ITest_Internals_TargetedMessaging.cpp LIBS S_ITests_STH_Internals ) @@ -93,7 +89,6 @@ add_silkit_test_to_executable(SilKitIntegrationTests SilKit ) -# XXX Non-Internals Candidate add_silkit_test_to_executable(SilKitIntegrationTests SOURCES ITest_DifferentPeriods.cpp @@ -119,32 +114,27 @@ add_silkit_test_to_executable(SilKitIntegrationTests ) add_silkit_test_to_executable(SilKitIntegrationTests - TESTSUITE_NAME ITest_ServiceDiscovery SOURCES ITest_Internals_ServiceDiscovery.cpp LIBS S_ITests_STH_Internals ) add_silkit_test_to_executable(SilKitIntegrationTests - TESTSUITE_NAME ITest_RequestReply SOURCES ITest_Internals_RequestReply.cpp LIBS S_SilKitImpl ) add_silkit_test_to_executable(SilKitFunctionalTests - TESTSUITE_NAME FTest_ServiceDiscoveryPerf - SOURCES FTest_Internals_ServiceDiscoveryPerf.cpp + SOURCES FTest_ServiceDiscoveryPerf.cpp LIBS S_ITests_STH_Internals ) add_silkit_test_to_executable(SilKitIntegrationTests - TESTSUITE_NAME ITest_SystemMonitor - SOURCES ITest_Internals_SystemMonitor.cpp + SOURCES ITest_SystemMonitor.cpp LIBS S_ITests_STH_Internals ) add_silkit_test_to_executable(SilKitFunctionalTests - TESTSUITE_NAME FTest_PubSubPerf - SOURCES FTest_Internals_PubSubPerf.cpp + SOURCES FTest_PubSubPerf.cpp LIBS S_ITests_STH ) diff --git a/SilKit/IntegrationTests/FTest_Internals_PubSubPerf.cpp b/SilKit/IntegrationTests/FTest_PubSubPerf.cpp similarity index 100% rename from SilKit/IntegrationTests/FTest_Internals_PubSubPerf.cpp rename to SilKit/IntegrationTests/FTest_PubSubPerf.cpp diff --git a/SilKit/IntegrationTests/FTest_Internals_ServiceDiscoveryPerf.cpp b/SilKit/IntegrationTests/FTest_ServiceDiscoveryPerf.cpp similarity index 100% rename from SilKit/IntegrationTests/FTest_Internals_ServiceDiscoveryPerf.cpp rename to SilKit/IntegrationTests/FTest_ServiceDiscoveryPerf.cpp diff --git a/SilKit/IntegrationTests/ITest_Internals_Abort.cpp b/SilKit/IntegrationTests/ITest_Abort.cpp similarity index 99% rename from SilKit/IntegrationTests/ITest_Internals_Abort.cpp rename to SilKit/IntegrationTests/ITest_Abort.cpp index 7c526e6ac..b0d50edc3 100644 --- a/SilKit/IntegrationTests/ITest_Internals_Abort.cpp +++ b/SilKit/IntegrationTests/ITest_Abort.cpp @@ -19,7 +19,7 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "ITest_Internals_MultiThreadedParticipants.hpp" +#include "ITest_MultiThreadedParticipants.hpp" #include #include @@ -33,7 +33,7 @@ namespace { using namespace testing; -class ITest_Abort : public ITest_Internals_MultiThreadedParticipants +class ITest_Abort : public ITest_MultiThreadedParticipants { }; diff --git a/SilKit/IntegrationTests/ITest_Internals_HopOnHopOff.cpp b/SilKit/IntegrationTests/ITest_HopOnHopOff.cpp similarity index 99% rename from SilKit/IntegrationTests/ITest_Internals_HopOnHopOff.cpp rename to SilKit/IntegrationTests/ITest_HopOnHopOff.cpp index daebb3881..01131df5e 100644 --- a/SilKit/IntegrationTests/ITest_Internals_HopOnHopOff.cpp +++ b/SilKit/IntegrationTests/ITest_HopOnHopOff.cpp @@ -19,7 +19,7 @@ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "ITest_Internals_MultiThreadedParticipants.hpp" +#include "ITest_MultiThreadedParticipants.hpp" #include #include @@ -29,7 +29,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ namespace { -class ITest_HopOnHopOff : public ITest_Internals_MultiThreadedParticipants +class ITest_HopOnHopOff : public ITest_MultiThreadedParticipants { }; diff --git a/SilKit/IntegrationTests/ITest_Internals_ParticipantModes.cpp b/SilKit/IntegrationTests/ITest_Internals_ParticipantModes.cpp index 798e83415..356706bdf 100644 --- a/SilKit/IntegrationTests/ITest_Internals_ParticipantModes.cpp +++ b/SilKit/IntegrationTests/ITest_Internals_ParticipantModes.cpp @@ -69,10 +69,10 @@ enum class TimeMode Sync }; -class ITest_ParticipantModes : public testing::Test +class ITest_Internals_ParticipantModes : public testing::Test { protected: - ITest_ParticipantModes() {} + ITest_Internals_ParticipantModes() {} struct TestParticipant { @@ -699,7 +699,7 @@ class ITest_ParticipantModes : public testing::Test // Sync Coordinated NonReq -> Disallowed: Coordinated must be required // Sync Invalid Req/NonReq -> Disallowed -TEST_F(ITest_ParticipantModes, test_AsyncCoordinatedNonReq_disallowed) +TEST_F(ITest_Internals_ParticipantModes, test_AsyncCoordinatedNonReq_disallowed) { RunRegistry(); @@ -726,7 +726,7 @@ TEST_F(ITest_ParticipantModes, test_AsyncCoordinatedNonReq_disallowed) StopRegistry(); } -TEST_F(ITest_ParticipantModes, test_SyncCoordinatedNonReq_disallowed) +TEST_F(ITest_Internals_ParticipantModes, test_SyncCoordinatedNonReq_disallowed) { RunRegistry(); @@ -753,7 +753,7 @@ TEST_F(ITest_ParticipantModes, test_SyncCoordinatedNonReq_disallowed) StopRegistry(); } -TEST_F(ITest_ParticipantModes, test_SyncInvalid_disallowed) +TEST_F(ITest_Internals_ParticipantModes, test_SyncInvalid_disallowed) { RunRegistry(); @@ -787,7 +787,7 @@ TEST_F(ITest_ParticipantModes, test_SyncInvalid_disallowed) // Sync Coordinated Req // Sync Coordinated NonReq -> Disallowed -TEST_F(ITest_ParticipantModes, test_AsyncInvalidNonReq) +TEST_F(ITest_Internals_ParticipantModes, test_AsyncInvalidNonReq) { RunRegistry(); @@ -815,7 +815,7 @@ TEST_F(ITest_ParticipantModes, test_AsyncInvalidNonReq) StopRegistry(); } -TEST_F(ITest_ParticipantModes, test_AsyncAutonomousNonReq) +TEST_F(ITest_Internals_ParticipantModes, test_AsyncAutonomousNonReq) { RunRegistry(); @@ -844,7 +844,7 @@ TEST_F(ITest_ParticipantModes, test_AsyncAutonomousNonReq) StopRegistry(); } -TEST_F(ITest_ParticipantModes, test_AsyncAutonomousReq) +TEST_F(ITest_Internals_ParticipantModes, test_AsyncAutonomousReq) { RunRegistry(); @@ -881,7 +881,7 @@ TEST_F(ITest_ParticipantModes, test_AsyncAutonomousReq) StopRegistry(); } -TEST_F(ITest_ParticipantModes, test_AsyncCoordinatedReq) +TEST_F(ITest_Internals_ParticipantModes, test_AsyncCoordinatedReq) { RunRegistry(); @@ -923,7 +923,7 @@ TEST_F(ITest_ParticipantModes, test_AsyncCoordinatedReq) } -TEST_F(ITest_ParticipantModes, test_SyncAutonomousNonReq) +TEST_F(ITest_Internals_ParticipantModes, test_SyncAutonomousNonReq) { RunRegistry(); @@ -953,7 +953,7 @@ TEST_F(ITest_ParticipantModes, test_SyncAutonomousNonReq) } -TEST_F(ITest_ParticipantModes, test_SyncAutonomousReq) +TEST_F(ITest_Internals_ParticipantModes, test_SyncAutonomousReq) { RunRegistry(); @@ -992,7 +992,7 @@ TEST_F(ITest_ParticipantModes, test_SyncAutonomousReq) } -TEST_F(ITest_ParticipantModes, test_SyncCoordinatedReq) +TEST_F(ITest_Internals_ParticipantModes, test_SyncCoordinatedReq) { RunRegistry(); @@ -1033,7 +1033,7 @@ TEST_F(ITest_ParticipantModes, test_SyncCoordinatedReq) // ----------------- // Mode combinations -TEST_F(ITest_ParticipantModes, test_AsyncAutonomousReq_with_SyncCoordinated) +TEST_F(ITest_Internals_ParticipantModes, test_AsyncAutonomousReq_with_SyncCoordinated) { RunRegistry(); @@ -1077,7 +1077,7 @@ TEST_F(ITest_ParticipantModes, test_AsyncAutonomousReq_with_SyncCoordinated) } -TEST_F(ITest_ParticipantModes, test_AsyncInvalid_with_SyncAutonomous) +TEST_F(ITest_Internals_ParticipantModes, test_AsyncInvalid_with_SyncAutonomous) { RunRegistry(); @@ -1117,7 +1117,7 @@ TEST_F(ITest_ParticipantModes, test_AsyncInvalid_with_SyncAutonomous) // All combinations // ---------------- -TEST_F(ITest_ParticipantModes, test_Combinations) +TEST_F(ITest_Internals_ParticipantModes, test_Combinations) { RunRegistry(); diff --git a/SilKit/IntegrationTests/ITest_Internals_RequestReply.cpp b/SilKit/IntegrationTests/ITest_Internals_RequestReply.cpp index 228f146ac..aa0674608 100644 --- a/SilKit/IntegrationTests/ITest_Internals_RequestReply.cpp +++ b/SilKit/IntegrationTests/ITest_Internals_RequestReply.cpp @@ -44,17 +44,16 @@ namespace { using namespace std::chrono_literals; using namespace SilKit::Core; -class ITest_RequestReply : public testing::Test +class ITest_Internals_RequestReply : public testing::Test { protected: - - ITest_RequestReply() + ITest_Internals_RequestReply() { } }; -TEST_F(ITest_RequestReply, participant_replies) +TEST_F(ITest_Internals_RequestReply, participant_replies) { // Registry auto registryUri = MakeTestRegistryUri(); diff --git a/SilKit/IntegrationTests/ITest_Internals_ServiceDiscovery.cpp b/SilKit/IntegrationTests/ITest_Internals_ServiceDiscovery.cpp index 73ca8627d..9a87acd1a 100644 --- a/SilKit/IntegrationTests/ITest_Internals_ServiceDiscovery.cpp +++ b/SilKit/IntegrationTests/ITest_Internals_ServiceDiscovery.cpp @@ -44,11 +44,10 @@ namespace { using namespace std::chrono_literals; using namespace SilKit::Core; -class ITest_ServiceDiscovery : public testing::Test +class ITest_Internals_ServiceDiscovery : public testing::Test { protected: - - ITest_ServiceDiscovery() + ITest_Internals_ServiceDiscovery() { } @@ -56,7 +55,7 @@ class ITest_ServiceDiscovery : public testing::Test // Tests that the service discovery handler fires for created services // All created should be removed as well if a participant leaves -TEST_F(ITest_ServiceDiscovery, discover_services) +TEST_F(ITest_Internals_ServiceDiscovery, discover_services) { auto registryUri = MakeTestRegistryUri(); size_t numberOfServices = 5; @@ -148,7 +147,7 @@ TEST_F(ITest_ServiceDiscovery, discover_services) // Tests that the specific service discovery handler fires for created services // All created should be removed as well if a participant leaves -TEST_F(ITest_ServiceDiscovery, discover_specific_services) +TEST_F(ITest_Internals_ServiceDiscovery, discover_specific_services) { auto registryUri = MakeTestRegistryUri(); size_t numberOfServices = 5; diff --git a/SilKit/IntegrationTests/ITest_Internals_TargetedMessaging.cpp b/SilKit/IntegrationTests/ITest_Internals_TargetedMessaging.cpp index d4d4b48cc..49bef9135 100644 --- a/SilKit/IntegrationTests/ITest_Internals_TargetedMessaging.cpp +++ b/SilKit/IntegrationTests/ITest_Internals_TargetedMessaging.cpp @@ -44,7 +44,7 @@ using namespace std::chrono_literals; using namespace SilKit::Core; using namespace SilKit::Services::Orchestration; -TEST(ITest_TargetedMessaging, targeted_messaging) +TEST(ITest_Internals_TargetedMessaging, targeted_messaging) { auto registryUri = MakeTestRegistryUri(); diff --git a/SilKit/IntegrationTests/ITest_LinDynamicResponse.cpp b/SilKit/IntegrationTests/ITest_LinDynamicResponse.cpp index cf1fb488e..e1ba75db3 100644 --- a/SilKit/IntegrationTests/ITest_LinDynamicResponse.cpp +++ b/SilKit/IntegrationTests/ITest_LinDynamicResponse.cpp @@ -649,11 +649,12 @@ class ITest_LinDynamicResponse : public testing::Test //! \brief Dynamically respond to a frame header event by sending a previously unconfigured response -TEST(Test_LinDynamicResponse_Nofixture, deferred_simstep_response) +TEST_F(ITest_LinDynamicResponse, deferred_simstep_response) { auto registryUri = MakeTestRegistryUri(); auto participantNames = std::vector{ "LinMaster", "LinSlave1" }; - auto simTestHarness = std::make_unique(participantNames, registryUri, false); + + _simTestHarness = std::make_unique(participantNames, registryUri, false); LinFrame slaveResponseFrame; slaveResponseFrame.id = 34; @@ -680,10 +681,9 @@ TEST(Test_LinDynamicResponse_Nofixture, deferred_simstep_response) } state{ State::Sending }; { - auto&& participant = simTestHarness->GetParticipant("LinMaster")->Participant(); - auto&& lifecycleService = - simTestHarness->GetParticipant("LinMaster")->GetOrCreateLifecycleService(); - auto&& timeSyncService = simTestHarness->GetParticipant("LinMaster")->GetOrCreateTimeSyncService(); + auto&& participant = _simTestHarness->GetParticipant("LinMaster")->Participant(); + auto&& lifecycleService = _simTestHarness->GetParticipant("LinMaster")->GetOrCreateLifecycleService(); + auto&& timeSyncService = _simTestHarness->GetParticipant("LinMaster")->GetOrCreateTimeSyncService(); auto&& linController = participant->CreateLinController("LinController1", "LIN_1"); lifecycleService->SetCommunicationReadyHandler([linController]() { @@ -719,10 +719,9 @@ TEST(Test_LinDynamicResponse_Nofixture, deferred_simstep_response) std::chrono::nanoseconds headerReceived{0ms}; { - auto&& participant = simTestHarness->GetParticipant("LinSlave1")->Participant(); - auto&& lifecycleService = - simTestHarness->GetParticipant("LinSlave1")->GetOrCreateLifecycleService(); - auto&& timeSyncService = simTestHarness->GetParticipant("LinSlave1")->GetOrCreateTimeSyncService(); + auto&& participant = _simTestHarness->GetParticipant("LinSlave1")->Participant(); + auto&& lifecycleService = _simTestHarness->GetParticipant("LinSlave1")->GetOrCreateLifecycleService(); + auto&& timeSyncService = _simTestHarness->GetParticipant("LinSlave1")->GetOrCreateTimeSyncService(); auto&& linController = participant->CreateLinController("LinController1", "LIN_1"); lifecycleService->SetCommunicationReadyHandler([linController]() { @@ -754,7 +753,7 @@ TEST(Test_LinDynamicResponse_Nofixture, deferred_simstep_response) } //Run the test - auto ok = simTestHarness->Run(5s); + auto ok = _simTestHarness->Run(5s); ASSERT_TRUE(ok) << "SimTestHarness should terminate without timeout"; } diff --git a/SilKit/IntegrationTests/ITest_Internals_MultiThreadedParticipants.hpp b/SilKit/IntegrationTests/ITest_MultiThreadedParticipants.hpp similarity index 99% rename from SilKit/IntegrationTests/ITest_Internals_MultiThreadedParticipants.hpp rename to SilKit/IntegrationTests/ITest_MultiThreadedParticipants.hpp index b97e51069..fb58eec46 100644 --- a/SilKit/IntegrationTests/ITest_Internals_MultiThreadedParticipants.hpp +++ b/SilKit/IntegrationTests/ITest_MultiThreadedParticipants.hpp @@ -44,8 +44,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "silkit/services/pubsub/PubSubSpec.hpp" #include "ConfigurationTestUtils.hpp" -#include "IParticipantInternal.hpp" -#include "CreateParticipantImpl.hpp" #include "functional.hpp" #include "silkit/experimental/participant/ParticipantExtensions.hpp" @@ -78,10 +76,10 @@ enum class TimeMode Sync }; -class ITest_Internals_MultiThreadedParticipants : public testing::Test +class ITest_MultiThreadedParticipants : public testing::Test { protected: - ITest_Internals_MultiThreadedParticipants() {} + ITest_MultiThreadedParticipants() {} struct Callbacks { diff --git a/SilKit/IntegrationTests/ITest_Internals_SystemMonitor.cpp b/SilKit/IntegrationTests/ITest_SystemMonitor.cpp similarity index 99% rename from SilKit/IntegrationTests/ITest_Internals_SystemMonitor.cpp rename to SilKit/IntegrationTests/ITest_SystemMonitor.cpp index 27619cfaf..268698452 100644 --- a/SilKit/IntegrationTests/ITest_Internals_SystemMonitor.cpp +++ b/SilKit/IntegrationTests/ITest_SystemMonitor.cpp @@ -30,7 +30,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include "SimTestHarness.hpp" #include "GetTestPid.hpp" #include "ConfigurationTestUtils.hpp" -#include "VAsioRegistry.hpp" #include "SyncDatatypeUtils.hpp" #include "gmock/gmock.h" diff --git a/SilKit/source/services/logging/Test_Logger.cpp b/SilKit/source/services/logging/Test_Logger.cpp index 8ae17a4e8..95b5b3c17 100644 --- a/SilKit/source/services/logging/Test_Logger.cpp +++ b/SilKit/source/services/logging/Test_Logger.cpp @@ -158,7 +158,7 @@ TEST(Test_Logger, get_log_level) EXPECT_EQ(logger.GetLogLevel(), Level::Debug); } -TEST(LogOnceFlag, check_setter) +TEST(Test_Logger, LogOnceFlag_check_setter) { LogOnceFlag once; EXPECT_EQ(once.WasCalled(), false);