@@ -10,7 +10,7 @@ using std::u16string;
10
10
11
11
TEST_CASE (" EncodingConversion::decode - basic UTF-8" ) {
12
12
auto conversion = transcoding_from (" UTF-8" );
13
- string input (" abγdefg\n hijklmnop" );
13
+ string input (u8 " abγdefg\n hijklmnop" );
14
14
15
15
u16string string;
16
16
conversion->decode (string, input.data (), input.size ());
@@ -123,15 +123,15 @@ TEST_CASE("EncodingConversion::encode - invalid characters in the middle of the
123
123
124
124
bytes_encoded = conversion->encode (
125
125
string, &start, string.size (), output.data (), output.size ());
126
- REQUIRE (std::string (output.data (), bytes_encoded) == " abc" " \ufffd " " def" );
126
+ REQUIRE (std::string (output.data (), bytes_encoded) == u8 " abc" u8 "\ufffd " u8 " def" );
127
127
128
128
// Here, the invalid character occurs at the end of a chunk.
129
129
start = 0 ;
130
130
bytes_encoded = conversion->encode (
131
131
string, &start, 4 , output.data (), output.size ());
132
132
bytes_encoded += conversion->encode (
133
133
string, &start, string.size (), output.data () + bytes_encoded, output.size () - bytes_encoded);
134
- REQUIRE (std::string (output.data (), bytes_encoded) == " abc" " \ufffd " " def" );
134
+ REQUIRE (std::string (output.data (), bytes_encoded) == u8 " abc" u8 "\ufffd " u8 " def" );
135
135
}
136
136
137
137
TEST_CASE (" EncodingConversion::encode - invalid characters at the end of the string" ) {
@@ -143,5 +143,5 @@ TEST_CASE("EncodingConversion::encode - invalid characters at the end of the str
143
143
144
144
bytes_encoded = conversion->encode (
145
145
string, &start, string.size (), output.data (), output.size (), true );
146
- REQUIRE (std::string (output.data (), bytes_encoded) == " abc" " \ufffd " );
146
+ REQUIRE (std::string (output.data (), bytes_encoded) == u8 " abc" u8 "\ufffd " );
147
147
}
0 commit comments