Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] 2 tests renamed #1726

Merged
merged 2 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions ecal/tests/cpp/config_test/src/config_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ TEST(core_cpp_config /*unused*/, user_config_passing /*unused*/)
EXPECT_EQ(0, eCAL::Finalize());
}

TEST(ConfigDeathTest /*unused*/, user_config_death_test /*unused*/)
TEST(core_cpp_config /*unused*/, user_config_death_test /*unused*/)
{
eCAL::Configuration custom_config(0, nullptr);

Expand Down Expand Up @@ -198,7 +198,7 @@ TEST(core_cpp_config /*unused*/, config_custom_datatypes_tests /*unused*/)
EXPECT_EQ(config1.transport_layer.udp.network.group, testValue);
}

TEST(CmdParserTest /*unused*/, config_cmd_parser_test /*unused*/)
TEST(core_cpp_config /*unused*/, config_cmd_parser_test /*unused*/)
{
const std::string some_file_name = "someFileName.yml";

Expand All @@ -222,7 +222,7 @@ TEST(CmdParserTest /*unused*/, config_cmd_parser_test /*unused*/)
}

#ifdef ECAL_CORE_CONFIGURATION
TEST(YamlConfigReaderTest /*unused*/, read_write_file_test /*unused*/)
TEST(core_cpp_config /*unused*/, read_write_file_test /*unused*/)
{
// create a custom ini file
std::string ini_file_name = "customIni.yml";
Expand All @@ -249,7 +249,7 @@ TEST(YamlConfigReaderTest /*unused*/, read_write_file_test /*unused*/)
remove("myTest.yml");
}

TEST(YamlConfigReaderTest /*unused*/, parse_values_test /*unused*/)
TEST(core_cpp_config /*unused*/, parse_values_test /*unused*/)
{
eCAL::Configuration config{};
EXPECT_NO_THROW(eCAL::Config::YamlStringToConfig(ini_file_as_string_yaml, config));
Expand All @@ -273,7 +273,7 @@ TEST(YamlConfigReaderTest /*unused*/, parse_values_test /*unused*/)
EXPECT_EQ(config.publisher.layer.shm.acknowledge_timeout_ms, 346U);
}

TEST(YamlConfigReaderTest /*unused*/, yaml_node_merger /*unused*/)
TEST(core_cpp_config /*unused*/, yaml_node_merger /*unused*/)
{
YAML::Node node_1{};
YAML::Node node_2{};
Expand All @@ -299,7 +299,7 @@ TEST(YamlConfigReaderTest /*unused*/, yaml_node_merger /*unused*/)
EXPECT_EQ(node_1["firstLayer2"]["secondLayer2"], node_2["firstLayer2"]["secondLayer2"]);
}

TEST(YamlConfigReaderTest /*unused*/, yaml_to_config_merger /*unused*/)
TEST(core_cpp_config /*unused*/, yaml_to_config_merger /*unused*/)
{
// create a custom ini file
std::string ini_file_name = "customIni.yml";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct TestParams
};

// test class that accepts TestParams as a parameter
class EcalTest : public ::testing::TestWithParam<TestParams>
class TestFixture : public ::testing::TestWithParam<TestParams>
{
protected:
void SetUp() override
Expand All @@ -50,7 +50,7 @@ class EcalTest : public ::testing::TestWithParam<TestParams>
}
};

TEST_P(EcalTest, GetPublisherIDsReturnsCorrectNumber)
TEST_P(TestFixture, GetPublisherIDsReturnsCorrectNumber)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: all parameters should be named in a function [readability-named-parameter]

Suggested change
TEST_P(TestFixture, GetPublisherIDsReturnsCorrectNumber)
TEST_P(TestFixture /*unused*/, GetPublisherIDsReturnsCorrectNumber /*unused*/)

{
{
// create publishers for testing
Expand Down Expand Up @@ -88,7 +88,7 @@ TEST_P(EcalTest, GetPublisherIDsReturnsCorrectNumber)
ASSERT_EQ(pub_ids2.size(), 0);
}

TEST_P(EcalTest, PublisherEventCallbackIsTriggered)
TEST_P(TestFixture, PublisherEventCallbackIsTriggered)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: all parameters should be named in a function [readability-named-parameter]

Suggested change
TEST_P(TestFixture, PublisherEventCallbackIsTriggered)
TEST_P(TestFixture /*unused*/, PublisherEventCallbackIsTriggered /*unused*/)

{
std::atomic<size_t> created_publisher_num(0);
std::atomic<size_t> deleted_publisher_num(0);
Expand Down Expand Up @@ -149,8 +149,8 @@ TEST_P(EcalTest, PublisherEventCallbackIsTriggered)

// instantiate the test suite with different configurations and publisher counts
INSTANTIATE_TEST_SUITE_P(
GetPublisherIdTests,
EcalTest,
core_cpp_registration_public,
TestFixture,
::testing::Values(
TestParams{ 10, []() {
// shm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct TestParams
};

// test class that accepts TestParams as a parameter
class EcalTest : public ::testing::TestWithParam<TestParams>
class TestFixture : public ::testing::TestWithParam<TestParams>
{
protected:
void SetUp() override
Expand All @@ -50,7 +50,7 @@ class EcalTest : public ::testing::TestWithParam<TestParams>
}
};

TEST_P(EcalTest, GetSubscriberIDsReturnsCorrectNumber)
TEST_P(TestFixture, GetSubscriberIDsReturnsCorrectNumber)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: all parameters should be named in a function [readability-named-parameter]

Suggested change
TEST_P(TestFixture, GetSubscriberIDsReturnsCorrectNumber)
TEST_P(TestFixture /*unused*/, GetSubscriberIDsReturnsCorrectNumber /*unused*/)

{
{
// create subscribers for testing
Expand Down Expand Up @@ -88,7 +88,7 @@ TEST_P(EcalTest, GetSubscriberIDsReturnsCorrectNumber)
ASSERT_EQ(sub_ids2.size(), 0);
}

TEST_P(EcalTest, SubscriberEventCallbackIsTriggered)
TEST_P(TestFixture, SubscriberEventCallbackIsTriggered)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: all parameters should be named in a function [readability-named-parameter]

Suggested change
TEST_P(TestFixture, SubscriberEventCallbackIsTriggered)
TEST_P(TestFixture /*unused*/, SubscriberEventCallbackIsTriggered /*unused*/)

{
std::atomic<size_t> created_subscriber_num(0);
std::atomic<size_t> deleted_subscriber_num(0);
Expand Down Expand Up @@ -149,8 +149,8 @@ TEST_P(EcalTest, SubscriberEventCallbackIsTriggered)

// instantiate the test suite with different configurations and subscriber counts
INSTANTIATE_TEST_SUITE_P(
GetSubscriberIdTests,
EcalTest,
core_cpp_registration_public,
TestFixture,
::testing::Values(
TestParams{ 10, []() {
// shm
Expand Down
Loading