Skip to content

Commit ae59310

Browse files
more
1 parent 2632e26 commit ae59310

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libc/test/src/__support/integer_to_string_test.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ TEST(LlvmLibcIntegerToStringTest, UINT8) {
4141
EXPECT(type, 12, "12");
4242
EXPECT(type, 123, "123");
4343
EXPECT(type, UINT8_MAX, "255");
44-
EXPECT(type, static_cast<unsigned char>(-1), "255");
44+
EXPECT(type, static_cast<uint8_t>(-1), "255");
4545
}
4646

4747
TEST(LlvmLibcIntegerToStringTest, INT8) {
@@ -65,7 +65,7 @@ TEST(LlvmLibcIntegerToStringTest, UINT16) {
6565
EXPECT(type, 1234, "1234");
6666
EXPECT(type, 12345, "12345");
6767
EXPECT(type, UINT16_MAX, "65535");
68-
EXPECT(type, -1, "65535");
68+
EXPECT(type, static_cast<uint16_t>(-1), "65535");
6969
}
7070

7171
TEST(LlvmLibcIntegerToStringTest, INT16) {
@@ -99,7 +99,7 @@ TEST(LlvmLibcIntegerToStringTest, UINT32) {
9999
EXPECT(type, 123456789, "123456789");
100100
EXPECT(type, 1234567890, "1234567890");
101101
EXPECT(type, UINT32_MAX, "4294967295");
102-
EXPECT(type, -1, "4294967295");
102+
EXPECT(type, static_cast<uint32_t>(-1), "4294967295");
103103
}
104104

105105
TEST(LlvmLibcIntegerToStringTest, INT32) {
@@ -144,7 +144,7 @@ TEST(LlvmLibcIntegerToStringTest, UINT64) {
144144
EXPECT(type, 1234567890, "1234567890");
145145
EXPECT(type, 1234567890123456789, "1234567890123456789");
146146
EXPECT(type, UINT64_MAX, "18446744073709551615");
147-
EXPECT(type, -1, "18446744073709551615");
147+
EXPECT(type, static_cast<uint64_t>(-1), "18446744073709551615");
148148
}
149149

150150
TEST(LlvmLibcIntegerToStringTest, INT64) {
@@ -181,7 +181,7 @@ TEST(LlvmLibcIntegerToStringTest, UINT64_Base_8) {
181181
EXPECT(type, 0, "0");
182182
EXPECT(type, 012345, "12345");
183183
EXPECT(type, 0123456701234567012345, "123456701234567012345");
184-
EXPECT(type, 01777777777777777777777, "1777777777777777777777");
184+
EXPECT(type, static_cast<int64_t>(01777777777777777777777), "1777777777777777777777");
185185
}
186186

187187
TEST(LlvmLibcIntegerToStringTest, UINT64_Base_16) {

0 commit comments

Comments
 (0)