Skip to content

Commit 361904c

Browse files
committed
fix clang-tidy bugprone-suspicious-missing-comma warning
1 parent 09ab668 commit 361904c

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

exporters/ostream/test/ostream_log_test.cc

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ TEST(OstreamLogExporter, DefaultLogRecordToCout)
125125
" severity_text : INVALID\n",
126126
" body : \n",
127127
" resource : \n",
128-
" telemetry.sdk.version: " OPENTELEMETRY_VERSION "\n",
128+
std::string{" telemetry.sdk.version: "} + OPENTELEMETRY_VERSION + "\n",
129129
" telemetry.sdk.name: opentelemetry\n",
130130
" telemetry.sdk.language: cpp\n",
131131
" attributes : \n",
@@ -136,7 +136,7 @@ TEST(OstreamLogExporter, DefaultLogRecordToCout)
136136
" trace_flags : 00\n",
137137
" scope : \n",
138138
" name : otel-cpp\n",
139-
" version : " OPENTELEMETRY_SDK_VERSION "\n",
139+
std::string{" version : "} + OPENTELEMETRY_SDK_VERSION + "\n",
140140
" schema_url : https://opentelemetry.io/schemas/1.15.0\n",
141141
" attributes : \n",
142142
" scope.attr.key: scope.attr.value\n",
@@ -199,7 +199,7 @@ TEST(OStreamLogRecordExporter, SimpleLogToCout)
199199
" severity_text : TRACE\n"
200200
" body : Message\n",
201201
" resource : \n",
202-
" telemetry.sdk.version: " OPENTELEMETRY_VERSION "\n",
202+
std::string{" telemetry.sdk.version: "} + OPENTELEMETRY_VERSION + "\n",
203203
" telemetry.sdk.name: opentelemetry\n",
204204
" telemetry.sdk.language: cpp\n",
205205
" attributes : \n",
@@ -210,7 +210,7 @@ TEST(OStreamLogRecordExporter, SimpleLogToCout)
210210
" trace_flags : 00\n",
211211
" scope : \n",
212212
" name : otel-cpp\n",
213-
" version : " OPENTELEMETRY_SDK_VERSION "\n",
213+
std::string{" version : "} + OPENTELEMETRY_SDK_VERSION + "\n",
214214
" schema_url : https://opentelemetry.io/schemas/1.15.0\n",
215215
" attributes : \n",
216216
" scope.attr.key: scope.attr.value\n",
@@ -270,7 +270,7 @@ TEST(OStreamLogRecordExporter, LogWithStringAttributesToCerr)
270270
" severity_text : INVALID\n",
271271
" body : \n",
272272
" resource : \n",
273-
" telemetry.sdk.version: " OPENTELEMETRY_VERSION "\n",
273+
std::string{" telemetry.sdk.version: "} + OPENTELEMETRY_VERSION + "\n",
274274
" telemetry.sdk.name: opentelemetry\n",
275275
" telemetry.sdk.language: cpp\n",
276276
" service.name: unknown_service\n",
@@ -284,7 +284,7 @@ TEST(OStreamLogRecordExporter, LogWithStringAttributesToCerr)
284284
" trace_flags : 00\n",
285285
" scope : \n",
286286
" name : otel-cpp\n",
287-
" version : " OPENTELEMETRY_SDK_VERSION "\n",
287+
std::string{" version : "} + OPENTELEMETRY_SDK_VERSION + "\n",
288288
" schema_url : https://opentelemetry.io/schemas/1.15.0\n",
289289
" attributes : \n",
290290
" scope.attr.key: scope.attr.value\n",
@@ -352,7 +352,7 @@ TEST(OStreamLogRecordExporter, LogWithVariantTypesToClog)
352352
" body : \n",
353353
" resource : \n",
354354
" service.name: unknown_service\n",
355-
" telemetry.sdk.version: " OPENTELEMETRY_VERSION "\n",
355+
std::string{" telemetry.sdk.version: "} + OPENTELEMETRY_VERSION + "\n",
356356
" telemetry.sdk.name: opentelemetry\n",
357357
" telemetry.sdk.language: cpp\n",
358358
" res1: [1,2,3]\n",
@@ -365,7 +365,7 @@ TEST(OStreamLogRecordExporter, LogWithVariantTypesToClog)
365365
" trace_flags : 00\n",
366366
" scope : \n",
367367
" name : otel-cpp\n",
368-
" version : " OPENTELEMETRY_SDK_VERSION "\n",
368+
std::string{" version : "} + OPENTELEMETRY_SDK_VERSION + "\n",
369369
" schema_url : https://opentelemetry.io/schemas/1.15.0\n",
370370
" attributes : \n",
371371
" scope.attr.key: scope.attr.value\n",
@@ -425,7 +425,7 @@ TEST(OStreamLogRecordExporter, IntegrationTest)
425425
" severity_text : DEBUG\n",
426426
" body : Hello\n",
427427
" resource : \n",
428-
" telemetry.sdk.version: " OPENTELEMETRY_VERSION "\n",
428+
std::string{" telemetry.sdk.version: "} + OPENTELEMETRY_VERSION + "\n",
429429
" service.name: unknown_service\n",
430430
" telemetry.sdk.name: opentelemetry\n",
431431
" telemetry.sdk.language: cpp\n",
@@ -437,7 +437,7 @@ TEST(OStreamLogRecordExporter, IntegrationTest)
437437
" trace_flags : 00\n",
438438
" scope : \n",
439439
" name : opentelelemtry_library\n",
440-
" version : " OPENTELEMETRY_SDK_VERSION "\n",
440+
std::string{" version : "} + OPENTELEMETRY_SDK_VERSION + "\n",
441441
" schema_url : https://opentelemetry.io/schemas/1.11.0\n",
442442
" attributes : \n",
443443
" scope.attr.key: 123\n",
@@ -496,7 +496,7 @@ TEST(OStreamLogRecordExporter, IntegrationTestWithEventId)
496496
" severity_text : DEBUG\n",
497497
" body : Hello {key1} {key2}\n",
498498
" resource : \n",
499-
" telemetry.sdk.version: " OPENTELEMETRY_VERSION "\n",
499+
std::string{" telemetry.sdk.version: "} + OPENTELEMETRY_VERSION + "\n",
500500
" service.name: unknown_service\n",
501501
" telemetry.sdk.name: opentelemetry\n",
502502
" telemetry.sdk.language: cpp\n",
@@ -508,7 +508,7 @@ TEST(OStreamLogRecordExporter, IntegrationTestWithEventId)
508508
" trace_flags : 00\n",
509509
" scope : \n",
510510
" name : opentelelemtry_library\n",
511-
" version : " OPENTELEMETRY_SDK_VERSION "\n",
511+
std::string{" version : "} + OPENTELEMETRY_SDK_VERSION + "\n",
512512
" schema_url : https://opentelemetry.io/schemas/1.11.0\n",
513513
" attributes : \n",
514514
" scope.attr.key: 123\n",

0 commit comments

Comments
 (0)