@@ -10,7 +10,7 @@ using std::u16string;
1010
1111TEST_CASE (" EncodingConversion::decode - basic UTF-8" ) {
1212 auto conversion = transcoding_from (" UTF-8" );
13- string input (" abγdefg\n hijklmnop" );
13+ string input (u8 " abγdefg\n hijklmnop" );
1414
1515 u16string string;
1616 conversion->decode (string, input.data (), input.size ());
@@ -123,15 +123,15 @@ TEST_CASE("EncodingConversion::encode - invalid characters in the middle of the
123123
124124 bytes_encoded = conversion->encode (
125125 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" );
127127
128128 // Here, the invalid character occurs at the end of a chunk.
129129 start = 0 ;
130130 bytes_encoded = conversion->encode (
131131 string, &start, 4 , output.data (), output.size ());
132132 bytes_encoded += conversion->encode (
133133 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" );
135135}
136136
137137TEST_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
143143
144144 bytes_encoded = conversion->encode (
145145 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 " );
147147}
0 commit comments