@@ -45,50 +45,45 @@ static std::pair<opentelemetry::nostd::string_view, opentelemetry::common::Attri
45
45
static std::pair<opentelemetry::nostd::string_view, opentelemetry::common::AttributeValue> attr3 = {
46
46
" accept_third_attr" , 3 };
47
47
48
- static instrumentation_scope::InstrumentationScope *test_scope_1 =
49
- std::move (instrumentation_scope::InstrumentationScope::Create(" test_scope_1" )).get();
50
- static instrumentation_scope::InstrumentationScope *test_scope_2 =
51
- std::move (instrumentation_scope::InstrumentationScope::Create(" test_scope_2" , " 1.0" )).get();
52
- static instrumentation_scope::InstrumentationScope *test_scope_3 =
53
- std::move (instrumentation_scope::InstrumentationScope::Create(
54
- " test_scope_3" ,
55
- " 0" ,
56
- " https://opentelemetry.io/schemas/v1.18.0" ))
57
- .get();
58
- static instrumentation_scope::InstrumentationScope *test_scope_4 =
59
- std::move (instrumentation_scope::InstrumentationScope::Create(
60
- " test_scope_4" ,
61
- " 0" ,
62
- " https://opentelemetry.io/schemas/v1.18.0" ,
63
- {attr1}))
64
- .get();
65
- static instrumentation_scope::InstrumentationScope *test_scope_5 =
66
- std::move (instrumentation_scope::InstrumentationScope::Create(
67
- " test_scope_5" ,
68
- " 0" ,
69
- " https://opentelemetry.io/schemas/v1.18.0" ,
70
- {attr1, attr2, attr3}))
71
- .get();
48
+ static instrumentation_scope::InstrumentationScope test_scope_1 =
49
+ *std::move (instrumentation_scope::InstrumentationScope::Create(" test_scope_1" ));
50
+ static instrumentation_scope::InstrumentationScope test_scope_2 =
51
+ *std::move (instrumentation_scope::InstrumentationScope::Create(" test_scope_2" , " 1.0" ));
52
+ static instrumentation_scope::InstrumentationScope test_scope_3 =
53
+ *std::move (instrumentation_scope::InstrumentationScope::Create(
54
+ " test_scope_3" ,
55
+ " 0" ,
56
+ " https://opentelemetry.io/schemas/v1.18.0" ));
57
+ static instrumentation_scope::InstrumentationScope test_scope_4 = *std::move (
58
+ instrumentation_scope::InstrumentationScope::Create (" test_scope_4" ,
59
+ " 0" ,
60
+ " https://opentelemetry.io/schemas/v1.18.0" ,
61
+ {attr1}));
62
+ static instrumentation_scope::InstrumentationScope test_scope_5 = *std::move (
63
+ instrumentation_scope::InstrumentationScope::Create (" test_scope_5" ,
64
+ " 0" ,
65
+ " https://opentelemetry.io/schemas/v1.18.0" ,
66
+ {attr1, attr2, attr3}));
72
67
73
- const std::array<instrumentation_scope::InstrumentationScope * , 5 > instrumentation_scopes = {
68
+ const std::array<instrumentation_scope::InstrumentationScope, 5 > instrumentation_scopes = {
74
69
test_scope_1, test_scope_2, test_scope_3, test_scope_4, test_scope_5,
75
70
};
76
71
77
72
// Test fixture for VerifyDefaultConfiguratorBehavior
78
73
class DefaultTracerConfiguratorTestFixture
79
- : public ::testing::TestWithParam<instrumentation_scope::InstrumentationScope * >
74
+ : public ::testing::TestWithParam<instrumentation_scope::InstrumentationScope>
80
75
{};
81
76
82
77
// verifies that the default configurator always returns the default tracer config
83
78
TEST_P (DefaultTracerConfiguratorTestFixture, VerifyDefaultConfiguratorBehavior)
84
79
{
85
- instrumentation_scope::InstrumentationScope * scope = GetParam ();
80
+ instrumentation_scope::InstrumentationScope scope = GetParam ();
86
81
instrumentation_scope::ScopeConfigurator<trace_sdk::TracerConfig> default_configurator =
87
82
instrumentation_scope::ScopeConfigurator<trace_sdk::TracerConfig>::Builder (
88
83
trace_sdk::TracerConfig::Default ())
89
84
.Build ();
90
85
91
- ASSERT_EQ (default_configurator.ComputeConfig (* scope), trace_sdk::TracerConfig::Default ());
86
+ ASSERT_EQ (default_configurator.ComputeConfig (scope), trace_sdk::TracerConfig::Default ());
92
87
}
93
88
94
89
INSTANTIATE_TEST_SUITE_P (InstrumentationScopes,
0 commit comments