Lines Matching refs:Truncated

62 bool Truncated(const std::string& input,  in Truncated()  function
76 EXPECT_FALSE(Truncated(std::string(), 0, &output)); in TEST()
78 EXPECT_TRUE(Truncated("\xe1\x80\xbf", 0, &output)); in TEST()
80 EXPECT_FALSE(Truncated("\xe1\x80\xbf", static_cast<size_t>(-1), &output)); in TEST()
81 EXPECT_FALSE(Truncated("\xe1\x80\xbf", 4, &output)); in TEST()
84 EXPECT_TRUE(Truncated("abc", 2, &output)); in TEST()
86 EXPECT_TRUE(Truncated("\xc2\x81\xc2\x81", 2, &output)); in TEST()
88 EXPECT_TRUE(Truncated("\xc2\x81\xc2\x81", 3, &output)); in TEST()
90 EXPECT_FALSE(Truncated("\xc2\x81\xc2\x81", 4, &output)); in TEST()
96 EXPECT_TRUE(Truncated(array_string, 4, &output)); in TEST()
103 EXPECT_TRUE(Truncated(array_string, 4, &output)); in TEST()
108 EXPECT_TRUE(Truncated("\xed\xa0\x80\xed\xbf\xbf", 6, &output)); in TEST()
110 EXPECT_TRUE(Truncated("\xed\xa0\x8f", 3, &output)); in TEST()
112 EXPECT_TRUE(Truncated("\xed\xbf\xbf", 3, &output)); in TEST()
116 EXPECT_FALSE(Truncated("\xe1\x80\xbf", 3, &output)); in TEST()
118 EXPECT_FALSE(Truncated("\xf1\x80\xa0\xbf", 4, &output)); in TEST()
120 EXPECT_FALSE(Truncated("a\xc2\x81\xe1\x80\xbf\xf1\x80\xa0\xbf", in TEST()
123 EXPECT_TRUE(Truncated("a\xc2\x81\xe1\x80\xbf\xf1""a""\x80\xa0", in TEST()
126 EXPECT_FALSE(Truncated("\xef\xbb\xbf" "abc", 6, &output)); in TEST()
130 EXPECT_TRUE(Truncated("\xc0\x80", 2, &output)); in TEST()
132 EXPECT_TRUE(Truncated("\xc1\x80\xc1\x81", 4, &output)); in TEST()
134 EXPECT_TRUE(Truncated("\xe0\x80\x80", 3, &output)); in TEST()
136 EXPECT_TRUE(Truncated("\xe0\x82\x80", 3, &output)); in TEST()
138 EXPECT_TRUE(Truncated("\xe0\x9f\xbf", 3, &output)); in TEST()
140 EXPECT_TRUE(Truncated("\xf0\x80\x80\x8D", 4, &output)); in TEST()
142 EXPECT_TRUE(Truncated("\xf0\x80\x82\x91", 4, &output)); in TEST()
144 EXPECT_TRUE(Truncated("\xf0\x80\xa0\x80", 4, &output)); in TEST()
146 EXPECT_TRUE(Truncated("\xf0\x8f\xbb\xbf", 4, &output)); in TEST()
148 EXPECT_TRUE(Truncated("\xf8\x80\x80\x80\xbf", 5, &output)); in TEST()
150 EXPECT_TRUE(Truncated("\xfc\x80\x80\x80\xa0\xa5", 6, &output)); in TEST()
154 EXPECT_TRUE(Truncated("\xf4\x90\x80\x80", 4, &output)); in TEST()
156 EXPECT_TRUE(Truncated("\xf8\xa0\xbf\x80\xbf", 5, &output)); in TEST()
158 EXPECT_TRUE(Truncated("\xfc\x9c\xbf\x80\xbf\x80", 6, &output)); in TEST()
162 EXPECT_TRUE(Truncated("\xfe\xff", 2, &output)); in TEST()
164 EXPECT_TRUE(Truncated("\xff\xfe", 2, &output)); in TEST()
170 EXPECT_TRUE(Truncated(array_string, 4, &output)); in TEST()
178 EXPECT_FALSE(Truncated(array_string, 4, &output)); in TEST()
184 EXPECT_TRUE(Truncated(array_string, 4, &output)); in TEST()
189 EXPECT_TRUE(Truncated("\xef\xbf\xbe", 3, &output)); in TEST()
191 EXPECT_TRUE(Truncated("\xf0\x8f\xbf\xbe", 4, &output)); in TEST()
193 EXPECT_TRUE(Truncated("\xf3\xbf\xbf\xbf", 4, &output)); in TEST()
195 EXPECT_TRUE(Truncated("\xef\xb7\x90", 3, &output)); in TEST()
197 EXPECT_TRUE(Truncated("\xef\xb7\xaf", 3, &output)); in TEST()
202 EXPECT_TRUE(Truncated("caf\xe9", 4, &output)); in TEST()
204 EXPECT_TRUE(Truncated("\xb0\xa1\xb0\xa2", 4, &output)); in TEST()
206 EXPECT_FALSE(Truncated("\xa7\x41\xa6\x6e", 4, &output)); in TEST()
208 EXPECT_TRUE(Truncated("\xa7\x41\xa6\x6e\xd9\xee\xe4\xee", 7, in TEST()
213 EXPECT_FALSE(Truncated(output, 4, &output)); in TEST()
215 EXPECT_TRUE(Truncated(output, 3, &output)); in TEST()
219 EXPECT_TRUE(Truncated("\x93" "abc\x94", 5, &output)); in TEST()
223 EXPECT_TRUE(Truncated("\xd9\xee\xe4\xee", 4, &output)); in TEST()
227 EXPECT_TRUE(Truncated("\xe3\xe5\xe9\xdC", 4, &output)); in TEST()