Lines Matching refs:ASSERT_EQ
154 ASSERT_EQ(0U, mbrtoc16(NULL, NULL, 0, NULL));
165 ASSERT_EQ(0U, mbrtoc16(&out, "hello", 0, NULL));
166 ASSERT_EQ(L'x', out);
168 ASSERT_EQ(0U, mbrtoc16(&out, "hello", 0, NULL));
169 ASSERT_EQ(0U, mbrtoc16(&out, "", 0, NULL));
170 ASSERT_EQ(1U, mbrtoc16(&out, "hello", 1, NULL));
171 ASSERT_EQ(L'h', out);
185 ASSERT_EQ(1U, mbrtoc16(&out, "abcdef", 6, NULL));
186 ASSERT_EQ(L'a', out);
188 ASSERT_EQ(2U, mbrtoc16(&out, "\xc2\xa2" "cdef", 6, NULL));
189 ASSERT_EQ(static_cast<char16_t>(0x00a2), out);
191 ASSERT_EQ(3U, mbrtoc16(&out, "\xe2\x82\xac" "def", 6, NULL));
192 ASSERT_EQ(static_cast<char16_t>(0x20ac), out);
202 ASSERT_EQ(static_cast<size_t>(-3),
204 ASSERT_EQ(static_cast<char16_t>(0xdbea), out);
205 ASSERT_EQ(4U, mbrtoc16(&out, "\xf4\x8a\xaf\x8d" "ef", 6, NULL));
206 ASSERT_EQ(static_cast<char16_t>(0xdfcd), out);
215 ASSERT_EQ(static_cast<size_t>(-1),
225 ASSERT_EQ(static_cast<size_t>(-1),
239 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc16(&out, "\xc2", 1, ps));
240 ASSERT_EQ(1U, mbrtoc16(&out, "\xa2" "cdef", 5, ps));
241 ASSERT_EQ(static_cast<char16_t>(0x00a2), out);
244 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc16(&out, "\xe2", 1, ps));
245 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc16(&out, "\x82", 1, ps));
246 ASSERT_EQ(1U, mbrtoc16(&out, "\xac" "def", 4, ps));
247 ASSERT_EQ(static_cast<char16_t>(0x20ac), out);
250 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc16(&out, "\xf4", 1, ps));
251 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc16(&out, "\x8a\xaf", 2, ps));
252 ASSERT_EQ(static_cast<size_t>(-3), mbrtoc16(&out, "\x8d" "ef", 3, ps));
253 ASSERT_EQ(static_cast<char16_t>(0xdbea), out);
254 ASSERT_EQ(1U, mbrtoc16(&out, "\x80" "ef", 3, ps));
255 ASSERT_EQ(static_cast<char16_t>(0xdfcd), out);
259 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc16(&out, "\xc2", 1, ps));
260 ASSERT_EQ(static_cast<size_t>(-1), mbrtoc16(&out, "\x20" "cdef", 5, ps));
261 ASSERT_EQ(EILSEQ, errno);
328 ASSERT_EQ(0U, mbrtoc32(out, "hello", 0, NULL));
329 ASSERT_EQ(static_cast<char32_t>(L'x'), out[0]);
331 ASSERT_EQ(0U, mbrtoc32(out, "hello", 0, NULL));
332 ASSERT_EQ(0U, mbrtoc32(out, "", 0, NULL));
333 ASSERT_EQ(1U, mbrtoc32(out, "hello", 1, NULL));
334 ASSERT_EQ(static_cast<char32_t>(L'h'), out[0]);
336 ASSERT_EQ(0U, mbrtoc32(NULL, "hello", 0, NULL));
337 ASSERT_EQ(0U, mbrtoc32(NULL, "", 0, NULL));
338 ASSERT_EQ(1U, mbrtoc32(NULL, "hello", 1, NULL));
340 ASSERT_EQ(0U, mbrtoc32(NULL, NULL, 0, NULL));
346 ASSERT_EQ(1U, mbrtoc32(out, "abcdef", 6, NULL));
347 ASSERT_EQ(static_cast<char32_t>(L'a'), out[0]);
349 ASSERT_EQ(2U, mbrtoc32(out, "\xc2\xa2" "cdef", 6, NULL));
350 ASSERT_EQ(static_cast<char32_t>(0x00a2), out[0]);
352 ASSERT_EQ(3U, mbrtoc32(out, "\xe2\x82\xac" "def", 6, NULL));
353 ASSERT_EQ(static_cast<char32_t>(0x20ac), out[0]);
355 ASSERT_EQ(4U, mbrtoc32(out, "\xf0\xa4\xad\xa2" "ef", 6, NULL));
356 ASSERT_EQ(static_cast<char32_t>(0x24b62), out[0]);
359 ASSERT_EQ(static_cast<size_t>(-1), mbrtoc32(out, "\xf8\xa1\xa2\xa3\xa4" "f", 6, NULL));
360 ASSERT_EQ(EILSEQ, errno);
363 ASSERT_EQ(static_cast<size_t>(-1), mbrtoc32(out, "\xf0\x82\x82\xac" "ef", 6, NULL));
364 ASSERT_EQ(EILSEQ, errno);
377 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc32(&out, "\xc2", 1, ps));
378 ASSERT_EQ(1U, mbrtoc32(&out, "\xa2" "cdef", 5, ps));
379 ASSERT_EQ(static_cast<char32_t>(0x00a2), out);
382 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc32(&out, "\xe2", 1, ps));
383 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc32(&out, "\x82", 1, ps));
384 ASSERT_EQ(1U, mbrtoc32(&out, "\xac" "def", 4, ps));
385 ASSERT_EQ(static_cast<char32_t>(0x20ac), out);
388 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc32(&out, "\xf0", 1, ps));
389 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc32(&out, "\xa4\xad", 2, ps));
390 ASSERT_EQ(1U, mbrtoc32(&out, "\xa2" "ef", 3, ps));
391 ASSERT_EQ(static_cast<char32_t>(0x24b62), out);
395 ASSERT_EQ(static_cast<size_t>(-2), mbrtoc32(&out, "\xc2", 1, ps));
396 ASSERT_EQ(static_cast<size_t>(-1), mbrtoc32(&out, "\x20" "cdef", 5, ps));
397 ASSERT_EQ(EILSEQ, errno);