diff --git a/sdk/test/trace/tracer_config_test.cc b/sdk/test/trace/tracer_config_test.cc index c11ee8a81e..69504f7d83 100644 --- a/sdk/test/trace/tracer_config_test.cc +++ b/sdk/test/trace/tracer_config_test.cc @@ -36,38 +36,38 @@ std::pair attr3 = { "accept_third_attr", 3}; -const instrumentation_scope::InstrumentationScope instrumentation_scopes[] = { - *instrumentation_scope::InstrumentationScope::Create("test_scope_1").get(), - *instrumentation_scope::InstrumentationScope::Create("test_scope_2", "1.0").get(), - *instrumentation_scope::InstrumentationScope::Create("test_scope_3", - "0", - "https://opentelemetry.io/schemas/v1.18.0") - .get(), - *instrumentation_scope::InstrumentationScope::Create("test_scope_3", - "0", - "https://opentelemetry.io/schemas/v1.18.0", - {attr1}) - .get(), - *instrumentation_scope::InstrumentationScope::Create("test_scope_4", - "0", - "https://opentelemetry.io/schemas/v1.18.0", - {attr1, attr2, attr3}) - .get(), +const std::array instrumentation_scopes = { + instrumentation_scope::InstrumentationScope::Create("test_scope_1").get(), + instrumentation_scope::InstrumentationScope::Create("test_scope_2", "1.0").get(), + instrumentation_scope::InstrumentationScope::Create("test_scope_3", + "0", + "https://opentelemetry.io/schemas/v1.18.0") + .get(), + instrumentation_scope::InstrumentationScope::Create("test_scope_3", + "0", + "https://opentelemetry.io/schemas/v1.18.0", + {attr1}) + .get(), + instrumentation_scope::InstrumentationScope::Create("test_scope_4", + "0", + "https://opentelemetry.io/schemas/v1.18.0", + {attr1, attr2, attr3}) + .get(), }; // Test fixture for VerifyDefaultConfiguratorBehavior class DefaultTracerConfiguratorTestFixture - : public ::testing::TestWithParam + : public ::testing::TestWithParam {}; // verifies that the default configurator always returns the default tracer config TEST_P(DefaultTracerConfiguratorTestFixture, VerifyDefaultConfiguratorBehavior) { - const instrumentation_scope::InstrumentationScope &scope = GetParam(); + instrumentation_scope::InstrumentationScope *scope = GetParam(); trace_sdk::TracerConfigurator default_configurator = trace_sdk::TracerConfig::DefaultConfigurator(); - ASSERT_EQ(default_configurator(scope), trace_sdk::TracerConfig::Default()); + ASSERT_EQ(default_configurator(*scope), trace_sdk::TracerConfig::Default()); } INSTANTIATE_TEST_SUITE_P(InstrumentationScopes,