@@ -36,38 +36,39 @@ std::pair<opentelemetry::nostd::string_view, opentelemetry::common::AttributeVal
3636std::pair<opentelemetry::nostd::string_view, opentelemetry::common::AttributeValue> attr3 = {
3737 " accept_third_attr" , 3 };
3838
39- const 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" ,
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 (),
39+ const std::array< instrumentation_scope::InstrumentationScope *, 5 > 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" ,
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 (),
5656};
5757
5858// Test fixture for VerifyDefaultConfiguratorBehavior
5959class DefaultTracerConfiguratorTestFixture
60- : public ::testing::TestWithParam<instrumentation_scope::InstrumentationScope>
60+ : public ::testing::TestWithParam<instrumentation_scope::InstrumentationScope * >
6161{};
6262
6363// verifies that the default configurator always returns the default tracer config
6464TEST_P (DefaultTracerConfiguratorTestFixture, VerifyDefaultConfiguratorBehavior)
6565{
66- const instrumentation_scope::InstrumentationScope & scope = GetParam ();
66+ instrumentation_scope::InstrumentationScope * scope = GetParam ();
6767 trace_sdk::TracerConfigurator default_configurator =
6868 trace_sdk::TracerConfig::DefaultConfigurator ();
6969
70- ASSERT_EQ (default_configurator (scope), trace_sdk::TracerConfig::Default ());
70+ ASSERT_EQ (default_configurator (*scope), trace_sdk::TracerConfig::Default ());
71+ delete scope;
7172}
7273
7374INSTANTIATE_TEST_SUITE_P (InstrumentationScopes,
0 commit comments