@@ -75,12 +75,12 @@ TEST(utf16_to_utf8)
75
75
input.push_back (0x7FF );
76
76
result = utility::conversions::utf16_to_utf8 (input);
77
77
#if defined(__GLIBCXX__)
78
- VERIFY_ARE_EQUAL (- 62 , result[0 ]);
79
- VERIFY_ARE_EQUAL (- 128 , result[1 ]);
80
- VERIFY_ARE_EQUAL (- 59 , result[2 ]);
81
- VERIFY_ARE_EQUAL (- 115 , result[3 ]);
82
- VERIFY_ARE_EQUAL (- 33 , result[4 ]);
83
- VERIFY_ARE_EQUAL (- 65 , result[5 ]);
78
+ VERIFY_ARE_EQUAL (194u , result[0 ]);
79
+ VERIFY_ARE_EQUAL (128u , result[1 ]);
80
+ VERIFY_ARE_EQUAL (197u , result[2 ]);
81
+ VERIFY_ARE_EQUAL (141u , result[3 ]);
82
+ VERIFY_ARE_EQUAL (223u , result[4 ]);
83
+ VERIFY_ARE_EQUAL (191u , result[5 ]);
84
84
#else
85
85
VERIFY_ARE_EQUAL (conversion.to_bytes (input), result);
86
86
#endif
@@ -92,15 +92,15 @@ TEST(utf16_to_utf8)
92
92
input.push_back (0xFFFF );
93
93
result = utility::conversions::utf16_to_utf8 (input);
94
94
#if defined(__GLIBCXX__)
95
- VERIFY_ARE_EQUAL (- 32 , result[0 ]);
96
- VERIFY_ARE_EQUAL (- 96 , result[1 ]);
97
- VERIFY_ARE_EQUAL (- 128 , result[2 ]);
98
- VERIFY_ARE_EQUAL (- 31 , result[3 ]);
99
- VERIFY_ARE_EQUAL (- 110 , result[4 ]);
100
- VERIFY_ARE_EQUAL (- 85 , result[5 ]);
101
- VERIFY_ARE_EQUAL (- 17 , result[6 ]);
102
- VERIFY_ARE_EQUAL (- 65 , result[7 ]);
103
- VERIFY_ARE_EQUAL (- 65 , result[8 ]);
95
+ VERIFY_ARE_EQUAL (224u , result[0 ]);
96
+ VERIFY_ARE_EQUAL (160u , result[1 ]);
97
+ VERIFY_ARE_EQUAL (128u , result[2 ]);
98
+ VERIFY_ARE_EQUAL (225u , result[3 ]);
99
+ VERIFY_ARE_EQUAL (146u , result[4 ]);
100
+ VERIFY_ARE_EQUAL (171u , result[5 ]);
101
+ VERIFY_ARE_EQUAL (239u , result[6 ]);
102
+ VERIFY_ARE_EQUAL (191u , result[7 ]);
103
+ VERIFY_ARE_EQUAL (191u , result[8 ]);
104
104
#else
105
105
VERIFY_ARE_EQUAL (conversion.to_bytes (input), result);
106
106
#endif
@@ -118,18 +118,18 @@ TEST(utf16_to_utf8)
118
118
input.push_back (0xDFFF );
119
119
result = utility::conversions::utf16_to_utf8 (input);
120
120
#if defined(__GLIBCXX__)
121
- VERIFY_ARE_EQUAL (- 16 , result[0 ]);
122
- VERIFY_ARE_EQUAL (- 112 , result[1 ]);
123
- VERIFY_ARE_EQUAL (- 128 , result[2 ]);
124
- VERIFY_ARE_EQUAL (- 128 , result[3 ]);
125
- VERIFY_ARE_EQUAL (- 16 , result[4 ]);
126
- VERIFY_ARE_EQUAL (- 112 , result[5 ]);
127
- VERIFY_ARE_EQUAL (- 92 , result[6 ]);
128
- VERIFY_ARE_EQUAL (- 87 , result[7 ]);
129
- VERIFY_ARE_EQUAL (- 14 , result[8 ]);
130
- VERIFY_ARE_EQUAL (- 97 , result[9 ]);
131
- VERIFY_ARE_EQUAL (- 65 , result[10 ]);
132
- VERIFY_ARE_EQUAL (- 65 , result[11 ]);
121
+ VERIFY_ARE_EQUAL (240u , result[0 ]);
122
+ VERIFY_ARE_EQUAL (144u , result[1 ]);
123
+ VERIFY_ARE_EQUAL (128u , result[2 ]);
124
+ VERIFY_ARE_EQUAL (128u , result[3 ]);
125
+ VERIFY_ARE_EQUAL (240u , result[4 ]);
126
+ VERIFY_ARE_EQUAL (144u , result[5 ]);
127
+ VERIFY_ARE_EQUAL (164u , result[6 ]);
128
+ VERIFY_ARE_EQUAL (169u , result[7 ]);
129
+ VERIFY_ARE_EQUAL (242u , result[8 ]);
130
+ VERIFY_ARE_EQUAL (159u , result[9 ]);
131
+ VERIFY_ARE_EQUAL (191u , result[10 ]);
132
+ VERIFY_ARE_EQUAL (191u , result[11 ]);
133
133
#else
134
134
VERIFY_ARE_EQUAL (conversion.to_bytes (input), result);
135
135
#endif
0 commit comments