[Code health] Remove Unicode Text from Source files (#2707)
Signed-off-by: perhapsmaple <140232061+perhapsmaple@users.noreply.github.com>
This commit is contained in:
parent
aff26ac503
commit
e1d96901fc
|
@ -1,4 +1,4 @@
|
|||
// Copyright The OpenTelemetry Authors
|
||||
// Copyright The OpenTelemetry Authors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright The OpenTelemetry Authors
|
||||
// Copyright The OpenTelemetry Authors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright The OpenTelemetry Authors
|
||||
// Copyright The OpenTelemetry Authors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#pragma once
|
||||
|
|
|
@ -140,7 +140,8 @@ TEST(UrlDecoderTests, BasicTests)
|
|||
std::map<std::string, std::string> testdata{
|
||||
{"Authentication=Basic xxx", "Authentication=Basic xxx"},
|
||||
{"Authentication=Basic%20xxx", "Authentication=Basic xxx"},
|
||||
{"%C3%B6%C3%A0%C2%A7%C3%96abcd%C3%84", "öà§ÖabcdÄ"},
|
||||
{"%C3%B6%C3%A0%C2%A7%C3%96abcd%C3%84",
|
||||
"\xc3\xb6\xc3\xa0\xc2\xa7\xc3\x96\x61\x62\x63\x64\xc3\x84"},
|
||||
{"%2x", "%2x"},
|
||||
{"%20", " "},
|
||||
{"text%2", "text%2"},
|
||||
|
|
|
@ -111,7 +111,7 @@ void SpanShim::Log(opentracing::SystemTime timestamp,
|
|||
void SpanShim::logImpl(nostd::span<const EventEntry> fields,
|
||||
const opentracing::SystemTime *const timestamp) noexcept
|
||||
{
|
||||
// The Add Event’s name parameter MUST be the value with the event key
|
||||
// The Add Event's name parameter MUST be the value with the event key
|
||||
// in the pair set, or else fallback to use the log literal string.
|
||||
const auto &event = std::find_if(fields.begin(), fields.end(),
|
||||
[](const EventEntry &item) { return item.first == "event"; });
|
||||
|
|
|
@ -19,14 +19,14 @@ TEST(InstrumentMetadataValidator, TestName)
|
|||
{
|
||||
opentelemetry::sdk::metrics::InstrumentMetaDataValidator validator;
|
||||
std::vector<std::string> invalid_names = {
|
||||
"", // empty string
|
||||
"1sdf", // string starting with number
|
||||
"123€AAA€BBB", // unicode characters
|
||||
"", // empty string
|
||||
"1sdf", // string starting with number
|
||||
"\x31\x32\x33\xe2\x82\xac\x41\x41\x41\xe2\x82\xac\x42\x42\x42" // unicode characters
|
||||
"/\\sdsd", // string starting with special character
|
||||
"***sSSs", // string starting with special character
|
||||
"a\\broken\\path", // contains backward slash
|
||||
CreateVeryLargeString(25) + "X", // total 256 characters
|
||||
CreateVeryLargeString(26), // string much bigger than 255 characters
|
||||
CreateVeryLargeString(26), // string much bigger than 255 character
|
||||
};
|
||||
for (auto const &str : invalid_names)
|
||||
{
|
||||
|
@ -56,7 +56,7 @@ TEST(InstrumentMetadataValidator, TestUnit)
|
|||
std::vector<std::string> invalid_units = {
|
||||
CreateVeryLargeString(5) + "ABCERTYGJ", // total 64 charactes
|
||||
CreateVeryLargeString(7), // string bigger than 63 chars
|
||||
"123€AAA€BBB", // unicode string
|
||||
"\x31\x32\x33\xe2\x82\xac\x41\x41\x41\xe2\x82\xac\x42\x42\x42", // unicode string
|
||||
};
|
||||
for (auto const &str : invalid_units)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue