Lines Matching refs:b
29 char b[32]; in TEST_IMPL() local
33 p = b; in TEST_IMPL()
34 snprintf(b, sizeof(b), "%c\x7F", 0x00); in TEST_IMPL()
35 ASSERT_OK(uv__utf8_decode1(&p, b + sizeof(b))); in TEST_IMPL()
36 ASSERT_PTR_EQ(p, b + 1); in TEST_IMPL()
37 ASSERT_EQ(127, uv__utf8_decode1(&p, b + sizeof(b))); in TEST_IMPL()
38 ASSERT_PTR_EQ(p, b + 2); in TEST_IMPL()
41 p = b; in TEST_IMPL()
42 snprintf(b, sizeof(b), "\xC2\x80\xDF\xBF"); in TEST_IMPL()
43 ASSERT_EQ(128, uv__utf8_decode1(&p, b + sizeof(b))); in TEST_IMPL()
44 ASSERT_PTR_EQ(p, b + 2); in TEST_IMPL()
45 ASSERT_EQ(0x7FF, uv__utf8_decode1(&p, b + sizeof(b))); in TEST_IMPL()
46 ASSERT_PTR_EQ(p, b + 4); in TEST_IMPL()
49 p = b; in TEST_IMPL()
50 snprintf(b, sizeof(b), "\xE0\xA0\x80\xEF\xBF\xBF"); in TEST_IMPL()
51 ASSERT_EQ(0x800, uv__utf8_decode1(&p, b + sizeof(b))); in TEST_IMPL()
52 ASSERT_PTR_EQ(p, b + 3); in TEST_IMPL()
53 ASSERT_EQ(0xFFFF, uv__utf8_decode1(&p, b + sizeof(b))); in TEST_IMPL()
54 ASSERT_PTR_EQ(p, b + 6); in TEST_IMPL()
57 p = b; in TEST_IMPL()
58 snprintf(b, sizeof(b), "\xF0\x90\x80\x80\xF4\x8F\xBF\xBF"); in TEST_IMPL()
59 ASSERT_EQ(0x10000, uv__utf8_decode1(&p, b + sizeof(b))); in TEST_IMPL()
60 ASSERT_PTR_EQ(p, b + 4); in TEST_IMPL()
61 ASSERT_EQ(0x10FFFF, uv__utf8_decode1(&p, b + sizeof(b))); in TEST_IMPL()
62 ASSERT_PTR_EQ(p, b + 8); in TEST_IMPL()
65 p = b; in TEST_IMPL()
66 snprintf(b, sizeof(b), "\xF4\x90\xC0\xC0\xF7\xBF\xBF\xBF"); in TEST_IMPL()
67 ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b))); in TEST_IMPL()
68 ASSERT_PTR_EQ(p, b + 4); in TEST_IMPL()
69 ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b))); in TEST_IMPL()
70 ASSERT_PTR_EQ(p, b + 8); in TEST_IMPL()
73 p = b; in TEST_IMPL()
74 snprintf(b, sizeof(b), "\xC0\x80\xC1\x80"); in TEST_IMPL()
75 ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b))); in TEST_IMPL()
76 ASSERT_PTR_EQ(p, b + 2); in TEST_IMPL()
77 ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b))); in TEST_IMPL()
78 ASSERT_PTR_EQ(p, b + 4); in TEST_IMPL()
81 p = b; in TEST_IMPL()
82 snprintf(b, sizeof(b), "\xED\xA0\x80\xED\xA3\xBF"); in TEST_IMPL()
83 ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b))); in TEST_IMPL()
84 ASSERT_PTR_EQ(p, b + 3); in TEST_IMPL()
85 ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b))); in TEST_IMPL()
86 ASSERT_PTR_EQ(p, b + 6); in TEST_IMPL()
89 p = b; in TEST_IMPL()
90 snprintf(b, sizeof(b), "\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"); in TEST_IMPL()
93 ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b))); in TEST_IMPL()
94 ASSERT_PTR_EQ(p, b + i); in TEST_IMPL()
102 char b[1]; in TEST_IMPL() local
106 p = b; in TEST_IMPL()
107 b[0] = 0x7F; in TEST_IMPL()
108 ASSERT_EQ(0x7F, uv__utf8_decode1(&p, b + 1)); in TEST_IMPL()
109 ASSERT_PTR_EQ(p, b + 1); in TEST_IMPL()
112 p = b; in TEST_IMPL()
113 b[0] = 0xC0; in TEST_IMPL()
114 ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + 1)); in TEST_IMPL()
115 ASSERT_PTR_EQ(p, b + 1); in TEST_IMPL()
117 b[0] = 0x7F; in TEST_IMPL()
118 ASSERT_EQ(UV_EINVAL, uv__idna_toascii(b, b + 0, c, c + 1)); in TEST_IMPL()
119 ASSERT_EQ(UV_EINVAL, uv__idna_toascii(b, b + 1, c, c + 1)); in TEST_IMPL()