44#include < gtest/gtest.h>
55#include < opentelemetry/sdk/trace/tracer_config.h>
66
7- namespace trace_sdk = opentelemetry::sdk::trace;
7+ namespace trace_sdk = opentelemetry::sdk::trace;
88namespace instrumentation_scope = opentelemetry::sdk::instrumentationscope;
99
1010/* * Tests to verify the basic behavior of trace_sdk::TracerConfig */
@@ -30,33 +30,46 @@ TEST(TracerConfig, CheckDefaultConfigWorksAccToSpec)
3030/* * Tests to verify the behavior of trace_sdk::TracerConfig::DefaultConfigurator */
3131
3232std::pair<opentelemetry::nostd::string_view, opentelemetry::common::AttributeValue> attr1 = {
33- " accept_single_attr" , true };
33+ " accept_single_attr" , true };
3434std::pair<opentelemetry::nostd::string_view, opentelemetry::common::AttributeValue> attr2 = {
35- " accept_second_attr" , " some other attr" };
35+ " accept_second_attr" , " some other attr" };
3636std::pair<opentelemetry::nostd::string_view, opentelemetry::common::AttributeValue> attr3 = {
37- " accept_third_attr" , 3 };
37+ " accept_third_attr" , 3 };
3838
3939const instrumentation_scope::InstrumentationScope instrumentation_scopes[] = {
40- *instrumentation_scope::InstrumentationScope::Create (" test_scope_1" ).get (),
41- *instrumentation_scope::InstrumentationScope::Create (" test_scope_2" , " 1.0" ).get (),
42- *instrumentation_scope::InstrumentationScope::Create (" test_scope_3" , " 0" , " https://opentelemetry.io/schemas/v1.18.0" ).get (),
43- *instrumentation_scope::InstrumentationScope::Create (" test_scope_3" , " 0" , " https://opentelemetry.io/schemas/v1.18.0" , {attr1})
44- .get (),
45- *instrumentation_scope::InstrumentationScope::Create (" test_scope_4" , " 0" , " https://opentelemetry.io/schemas/v1.18.0" , {attr1, attr2, attr3})
46- .get (),
40+ *instrumentation_scope::InstrumentationScope::Create (" test_scope_1" ).get (),
41+ *instrumentation_scope::InstrumentationScope::Create (" test_scope_2" , " 1.0" ).get (),
42+ *instrumentation_scope::InstrumentationScope::Create (" test_scope_3" ,
43+ " 0" ,
44+ " https://opentelemetry.io/schemas/v1.18.0" )
45+ .get (),
46+ *instrumentation_scope::InstrumentationScope::Create (" test_scope_3" ,
47+ " 0" ,
48+ " https://opentelemetry.io/schemas/v1.18.0" ,
49+ {attr1})
50+ .get (),
51+ *instrumentation_scope::InstrumentationScope::Create (" test_scope_4" ,
52+ " 0" ,
53+ " https://opentelemetry.io/schemas/v1.18.0" ,
54+ {attr1, attr2, attr3})
55+ .get (),
4756};
4857
4958// Test fixture for VerifyDefaultConfiguratorBehavior
50- class DefaultTracerConfiguratorTestFixture : public ::testing::TestWithParam<instrumentation_scope::InstrumentationScope>
59+ class DefaultTracerConfiguratorTestFixture
60+ : public ::testing::TestWithParam<instrumentation_scope::InstrumentationScope>
5161{};
5262
5363// verifies that the default configurator always returns the default tracer config
5464TEST_P (DefaultTracerConfiguratorTestFixture, VerifyDefaultConfiguratorBehavior)
5565{
56- const instrumentation_scope::InstrumentationScope& scope = GetParam ();
57- trace_sdk::TracerConfigurator default_configurator = trace_sdk::TracerConfig::DefaultConfigurator ();
66+ const instrumentation_scope::InstrumentationScope &scope = GetParam ();
67+ trace_sdk::TracerConfigurator default_configurator =
68+ trace_sdk::TracerConfig::DefaultConfigurator ();
5869
5970 ASSERT_EQ (default_configurator (scope), trace_sdk::TracerConfig::Default ());
6071}
6172
62- INSTANTIATE_TEST_SUITE_P (InstrumentationScopes, DefaultTracerConfiguratorTestFixture, ::testing::ValuesIn(instrumentation_scopes));
73+ INSTANTIATE_TEST_SUITE_P (InstrumentationScopes,
74+ DefaultTracerConfiguratorTestFixture,
75+ ::testing::ValuesIn (instrumentation_scopes));
0 commit comments