From d7fcbca2203610a2dd809c4b90540671b5cd06fe Mon Sep 17 00:00:00 2001 From: Sanjeev <62834697+kumar-sanjeeev@users.noreply.github.com> Date: Tue, 17 Dec 2024 09:22:42 +0100 Subject: [PATCH] Update initial_value parameters of generic_system tests (#1943) --- .../src/mock_components/generic_system.cpp | 4 - .../mock_components/test_generic_system.cpp | 232 ++++++++++++------ 2 files changed, 155 insertions(+), 81 deletions(-) diff --git a/hardware_interface/src/mock_components/generic_system.cpp b/hardware_interface/src/mock_components/generic_system.cpp index 3fb9999b24..b216c708d6 100644 --- a/hardware_interface/src/mock_components/generic_system.cpp +++ b/hardware_interface/src/mock_components/generic_system.cpp @@ -725,10 +725,6 @@ void GenericSystem::initialize_storage_vectors( states[index][i] = hardware_interface::stod(it2->second); print_hint = true; } - else - { - print_hint = true; - } } } } diff --git a/hardware_interface/test/mock_components/test_generic_system.cpp b/hardware_interface/test/mock_components/test_generic_system.cpp index 41ce1d9041..6d579228f6 100644 --- a/hardware_interface/test/mock_components/test_generic_system.cpp +++ b/hardware_interface/test/mock_components/test_generic_system.cpp @@ -56,13 +56,15 @@ class TestGenericSystem : public ::testing::Test - - 1.57 + + 1.57 + - - 0.7854 + + 0.7854 + )"; @@ -75,13 +77,15 @@ class TestGenericSystem : public ::testing::Test - - 1.57 + + 1.57 + - - 0.7854 + + 0.7854 + )"; @@ -94,14 +98,15 @@ class TestGenericSystem : public ::testing::Test - - 1.57 + + 0.0 + - - 0.7854 - 0.8554 + + 0.7854 + )"; @@ -115,16 +120,22 @@ class TestGenericSystem : public ::testing::Test - - - 3.45 + + 3.45 + + + 0.0 + - - - 2.78 + + 2.78 + + + 0.0 + )"; @@ -138,23 +149,28 @@ class TestGenericSystem : public ::testing::Test - - - 1.55 - 0.1 + + 1.55 + + + 0.1 + - - - 0.65 - 0.2 + + 0.65 + + + 0.2 + - - 0.5 + + 0.5 + )"; @@ -168,14 +184,22 @@ class TestGenericSystem : public ::testing::Test - - + + 0.0 + + + 0.0 + - - + + 0.0 + + + 0.0 + @@ -197,14 +221,22 @@ class TestGenericSystem : public ::testing::Test - - + + 0.0 + + + 0.0 + - - + + 0.0 + + + 0.0 + @@ -221,19 +253,27 @@ class TestGenericSystem : public ::testing::Test mock_components/GenericSystem - True + True - - + + 0.0 + + + 0.0 + - - + + 0.0 + + + 0.0 + @@ -254,9 +294,12 @@ class TestGenericSystem : public ::testing::Test - - - 1.57 + + 1.57 + + + 0.0 + joint1 @@ -282,7 +325,9 @@ class TestGenericSystem : public ::testing::Test 3.45 - + + 0.0 + @@ -290,7 +335,9 @@ class TestGenericSystem : public ::testing::Test 2.78 - + + 0.0 + )"; @@ -306,16 +353,22 @@ class TestGenericSystem : public ::testing::Test - - - 3.45 + + 3.45 + + + 0.0 + - - - 2.78 + + 2.78 + + + 0.0 + )"; @@ -331,18 +384,24 @@ class TestGenericSystem : public ::testing::Test - - + + 3.45 + + + 0.0 + - 3.45 - - + + 2.78 + + + 0.0 + - 2.78 )"; @@ -361,14 +420,19 @@ class TestGenericSystem : public ::testing::Test 3.45 - + + 0.0 + - - - 2.78 + + 2.78 + + + 0.0 + @@ -393,16 +457,22 @@ class TestGenericSystem : public ::testing::Test - - - 3.45 + + 3.45 + + + 0.0 + - - - 2.78 + + 2.78 + + + 0.0 + @@ -422,21 +492,27 @@ class TestGenericSystem : public ::testing::Test mock_components/GenericSystem - True + True - - - 3.45 + + 3.45 + + + 0.0 + - - - 2.78 + + 2.78 + + + 0.0 + @@ -571,7 +647,9 @@ class TestGenericSystem : public ::testing::Test 3.45 - + + 0.0 + )";