Skip to content

Commit 2138da8

Browse files
committed
chore: fix cast conformance in C++23
1 parent 5aec27e commit 2138da8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

core/unicode_test.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ TEST(Unicode, TestUTF8RoundTripExhaustive)
105105
size_t at = 0;
106106
char32_t y = decode_utf8(buffer, at);
107107
EXPECT_NE(y, JSONNET_CODEPOINT_ERROR) << "UTF-8 roundtrip failed for codepoint " << x << " decode rejects" << std::endl;
108-
EXPECT_EQ(x, y) << "UTF-8 roundtrip failed for codepoint " << x << " converts to " << y << std::endl;
108+
EXPECT_EQ(x, y) << "UTF-8 roundtrip failed for codepoint " << static_cast<uint32_t>(x)
109+
<< " converts to " << static_cast<uint32_t>(y) << std::endl;
109110
EXPECT_EQ(at, buffer.size() - 1) << "UTF-8 roundtrip failed for codepoint " << x << " decodes incorrect length" << std::endl;
110111
}
111112
}

0 commit comments

Comments
 (0)