Skip to content

Commit 4aadb2a

Browse files
committed
Fix formatting
1 parent 355550a commit 4aadb2a

File tree

2 files changed

+29
-16
lines changed

2 files changed

+29
-16
lines changed

sdk/include/opentelemetry/sdk/trace/tracer_config.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class TracerConfig
2828
* @return a boolean indicating if the Tracer is enabled. Defaults to true.
2929
*/
3030
bool IsEnabled() const noexcept;
31-
bool operator==(const TracerConfig& other) const noexcept;
31+
bool operator==(const TracerConfig &other) const noexcept;
3232

3333
static TracerConfig Disabled();
3434
static TracerConfig Enabled();

sdk/test/trace/tracer_config_test.cc

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
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;
88
namespace 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

3232
std::pair<opentelemetry::nostd::string_view, opentelemetry::common::AttributeValue> attr1 = {
33-
"accept_single_attr", true};
33+
"accept_single_attr", true};
3434
std::pair<opentelemetry::nostd::string_view, opentelemetry::common::AttributeValue> attr2 = {
35-
"accept_second_attr", "some other attr"};
35+
"accept_second_attr", "some other attr"};
3636
std::pair<opentelemetry::nostd::string_view, opentelemetry::common::AttributeValue> attr3 = {
37-
"accept_third_attr", 3};
37+
"accept_third_attr", 3};
3838

3939
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", "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
5464
TEST_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

Comments
 (0)