Skip to content

Commit 4a531d2

Browse files
committed
fix compiler warnings
1 parent 7fff824 commit 4a531d2

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

tests/unit/src/unicode.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,30 +86,30 @@ const tst::set set("unicode", [](tst::suite& suite) {
8686
suite.add("utf32_to_utf8_two_byte", []() {
8787
auto ret = utki::to_utf8(0x41a); // Capital cyrillic K
8888
tst::check_eq(
89-
ret[0],
90-
char(0xd0),
89+
uint8_t(ret[0]),
90+
uint8_t(0xd0),
9191
[&](auto& o) {
9292
o << "ret[0] = 0x" << std::hex << (unsigned(ret[0]) & 0xff);
9393
},
9494
SL
9595
);
96-
tst::check_eq(ret[1], char(0x9a), SL);
97-
tst::check_eq(ret[2], char(0), SL);
96+
tst::check_eq(uint8_t(ret[1]), uint8_t(0x9a), SL);
97+
tst::check_eq(uint8_t(ret[2]), uint8_t(0), SL);
9898
});
9999

100100
suite.add("utf32_to_utf8_three_byte", []() {
101101
auto ret = utki::to_utf8(0xbf5); //
102102
tst::check_eq(
103-
ret[0],
104-
char(0xe0),
103+
uint8_t(ret[0]),
104+
uint8_t(0xe0),
105105
[&](auto& o) {
106106
o << "ret[0] = 0x" << std::hex << (unsigned(ret[0]) & 0xff);
107107
},
108108
SL
109109
);
110110
tst::check_eq(
111-
ret[1],
112-
char(0xaf),
111+
uint8_t(ret[1]),
112+
uint8_t(0xaf),
113113
[&](auto& o) {
114114
o << "ret[1] = 0x" << std::hex << (unsigned(ret[1]) & 0xff);
115115
},

0 commit comments

Comments
 (0)