diff --git a/tests/unit/test_display_device.cpp b/tests/unit/test_display_device.cpp index 83cc33db3ce..68167eccf57 100644 --- a/tests/unit/test_display_device.cpp +++ b/tests/unit/test_display_device.cpp @@ -28,7 +28,7 @@ namespace { }; } // namespace -namespace { +namespace test_parse_device_id { using ParseDeviceId = DisplayDeviceConfigTest>; INSTANTIATE_TEST_SUITE_P( DisplayDeviceTest, @@ -37,7 +37,7 @@ namespace { std::make_pair(""s, ""s), std::make_pair("SomeId"s, "SomeId"s), std::make_pair("{daeac860-f4db-5208-b1f5-cf59444fb768}"s, "{daeac860-f4db-5208-b1f5-cf59444fb768}"s))); - TEST_P(ParseDeviceId, BasicTest) { + TEST_P(ParseDeviceId, GeneralTest) { const auto &[input_value, expected_value] = GetParam(); config::video_t video_config {}; @@ -47,9 +47,9 @@ namespace { const auto result { display_device::parse_configuration(video_config, {}) }; EXPECT_EQ(std::get(result).m_device_id, expected_value); } -} // namespace +} // namespace test_parse_device_id -namespace { +namespace test_parse_config_option { using ParseConfigOption = DisplayDeviceConfigTest>>; INSTANTIATE_TEST_SUITE_P( DisplayDeviceTest, @@ -60,7 +60,7 @@ namespace { std::make_pair(config_option_e::ensure_active, DevicePreparation::EnsureActive), std::make_pair(config_option_e::ensure_primary, DevicePreparation::EnsurePrimary), std::make_pair(config_option_e::ensure_only_display, DevicePreparation::EnsureOnlyDisplay))); - TEST_P(ParseConfigOption, BasicTest) { + TEST_P(ParseConfigOption, GeneralTest) { const auto &[input_value, expected_value] = GetParam(); config::video_t video_config {}; @@ -74,9 +74,9 @@ namespace { ASSERT_EQ(std::get_if(&result) != nullptr, !expected_value); } } -} // namespace +} // namespace test_parse_config_option -namespace { +namespace test_parse_hdr_option { using client_wants_hdr = bool; using ParseHdrOption = DisplayDeviceConfigTest, std::optional>>; INSTANTIATE_TEST_SUITE_P( @@ -87,7 +87,7 @@ namespace { std::make_pair(std::make_pair(hdr_option_e::disabled, client_wants_hdr { false }), std::nullopt), std::make_pair(std::make_pair(hdr_option_e::automatic, client_wants_hdr { true }), HdrState::Enabled), std::make_pair(std::make_pair(hdr_option_e::automatic, client_wants_hdr { false }), HdrState::Disabled))); - TEST_P(ParseHdrOption, BasicTest) { + TEST_P(ParseHdrOption, GeneralTest) { const auto &[input_value, expected_value] = GetParam(); const auto &[input_hdr_option, input_enable_hdr] = input_value; @@ -101,9 +101,9 @@ namespace { const auto result { display_device::parse_configuration(video_config, session) }; EXPECT_EQ(std::get(result).m_hdr_state, expected_value); } -} // namespace +} // namespace test_parse_hdr_option -namespace { +namespace test_parse_resolution_option { struct failed_to_parse_resolution_t {}; struct no_resolution_t {}; @@ -162,7 +162,7 @@ namespace { std::make_pair(std::make_tuple(resolution_option_e::manual, sops_enabled { true }, max_uint_string + "x"s + max_uint_string), Resolution { max_uint, max_uint }), std::make_pair(std::make_tuple(resolution_option_e::manual, sops_enabled { true }, max_uint_string + "0"s + "x"s + max_uint_string), failed_to_parse_resolution_t {}), std::make_pair(std::make_tuple(resolution_option_e::manual, sops_enabled { true }, max_uint_string + "x"s + max_uint_string + "0"s), failed_to_parse_resolution_t {}))); - TEST_P(ParseResolutionOption, BasicTest) { + TEST_P(ParseResolutionOption, GeneralTest) { const auto &[input_value, expected_value] = GetParam(); const auto &[input_resolution_option, input_enable_sops, input_resolution] = input_value; @@ -197,9 +197,9 @@ namespace { EXPECT_EQ(std::get(result).m_resolution, expected_resolution); } } -} // namespace +} // namespace test_parse_resolution_option -namespace { +namespace test_parse_refresh_rate_option { struct failed_to_parse_refresh_rate_t {}; struct no_refresh_rate_t {}; @@ -252,7 +252,7 @@ namespace { std::make_pair(std::make_tuple(refresh_rate_option_e::manual, max_uint_string.substr(0, 1) + "."s + max_uint_string.substr(1)), Rational { max_uint, static_cast(std::pow(10, max_uint_string.size() - 1)) }), std::make_pair(std::make_tuple(refresh_rate_option_e::manual, max_uint_string.substr(0, 1) + "0"s + "."s + max_uint_string.substr(1)), failed_to_parse_refresh_rate_t {}), std::make_pair(std::make_tuple(refresh_rate_option_e::manual, max_uint_string.substr(0, 1) + "."s + "0"s + max_uint_string.substr(1)), failed_to_parse_refresh_rate_t {}))); - TEST_P(ParseRefreshRateOption, BasicTest) { + TEST_P(ParseRefreshRateOption, GeneralTest) { const auto &[input_value, expected_value] = GetParam(); const auto &[input_refresh_rate_option, input_refresh_rate] = input_value; @@ -283,4 +283,4 @@ namespace { EXPECT_EQ(std::get(result).m_refresh_rate, expected_refresh_rate); } } -} // namespace +} // namespace test_parse_refresh_rate_option