Lines Matching full:truncated
59 bool Truncated(const std::string& input, const size_t byte_size,
72 EXPECT_FALSE(Truncated("", 0, &output));
74 EXPECT_TRUE(Truncated("\xe1\x80\xbf", 0, &output));
76 EXPECT_FALSE(Truncated("\xe1\x80\xbf", -1, &output));
77 EXPECT_FALSE(Truncated("\xe1\x80\xbf", 4, &output));
80 EXPECT_TRUE(Truncated("abc", 2, &output));
82 EXPECT_TRUE(Truncated("\xc2\x81\xc2\x81", 2, &output));
84 EXPECT_TRUE(Truncated("\xc2\x81\xc2\x81", 3, &output));
86 EXPECT_FALSE(Truncated("\xc2\x81\xc2\x81", 4, &output));
92 EXPECT_TRUE(Truncated(array_string, 4, &output));
99 EXPECT_TRUE(Truncated(array_string, 4, &output));
104 EXPECT_TRUE(Truncated("\xed\xa0\x80\xed\xbf\xbf", 6, &output));
106 EXPECT_TRUE(Truncated("\xed\xa0\x8f", 3, &output));
108 EXPECT_TRUE(Truncated("\xed\xbf\xbf", 3, &output));
112 EXPECT_FALSE(Truncated("\xe1\x80\xbf", 3, &output));
114 EXPECT_FALSE(Truncated("\xf1\x80\xa0\xbf", 4, &output));
116 EXPECT_FALSE(Truncated("a\xc2\x81\xe1\x80\xbf\xf1\x80\xa0\xbf",
119 EXPECT_TRUE(Truncated("a\xc2\x81\xe1\x80\xbf\xf1""a""\x80\xa0",
122 EXPECT_FALSE(Truncated("\xef\xbb\xbf" "abc", 6, &output));
126 EXPECT_TRUE(Truncated("\xc0\x80", 2, &output));
128 EXPECT_TRUE(Truncated("\xc1\x80\xc1\x81", 4, &output));
130 EXPECT_TRUE(Truncated("\xe0\x80\x80", 3, &output));
132 EXPECT_TRUE(Truncated("\xe0\x82\x80", 3, &output));
134 EXPECT_TRUE(Truncated("\xe0\x9f\xbf", 3, &output));
136 EXPECT_TRUE(Truncated("\xf0\x80\x80\x8D", 4, &output));
138 EXPECT_TRUE(Truncated("\xf0\x80\x82\x91", 4, &output));
140 EXPECT_TRUE(Truncated("\xf0\x80\xa0\x80", 4, &output));
142 EXPECT_TRUE(Truncated("\xf0\x8f\xbb\xbf", 4, &output));
144 EXPECT_TRUE(Truncated("\xf8\x80\x80\x80\xbf", 5, &output));
146 EXPECT_TRUE(Truncated("\xfc\x80\x80\x80\xa0\xa5", 6, &output));
150 EXPECT_TRUE(Truncated("\xf4\x90\x80\x80", 4, &output));
152 EXPECT_TRUE(Truncated("\xf8\xa0\xbf\x80\xbf", 5, &output));
154 EXPECT_TRUE(Truncated("\xfc\x9c\xbf\x80\xbf\x80", 6, &output));
158 EXPECT_TRUE(Truncated("\xfe\xff", 2, &output));
160 EXPECT_TRUE(Truncated("\xff\xfe", 2, &output));
166 EXPECT_TRUE(Truncated(array_string, 4, &output));
174 EXPECT_FALSE(Truncated(array_string, 4, &output));
180 EXPECT_TRUE(Truncated(array_string, 4, &output));
185 EXPECT_TRUE(Truncated("\xef\xbf\xbe", 3, &output));
187 EXPECT_TRUE(Truncated("\xf0\x8f\xbf\xbe", 4, &output));
189 EXPECT_TRUE(Truncated("\xf3\xbf\xbf\xbf", 4, &output));
191 EXPECT_TRUE(Truncated("\xef\xb7\x90", 3, &output));
193 EXPECT_TRUE(Truncated("\xef\xb7\xaf", 3, &output));
198 EXPECT_TRUE(Truncated("caf\xe9", 4, &output));
200 EXPECT_TRUE(Truncated("\xb0\xa1\xb0\xa2", 4, &output));
202 EXPECT_FALSE(Truncated("\xa7\x41\xa6\x6e", 4, &output));
204 EXPECT_TRUE(Truncated("\xa7\x41\xa6\x6e\xd9\xee\xe4\xee", 7,
209 EXPECT_FALSE(Truncated(output, 4, &output));
211 EXPECT_TRUE(Truncated(output, 3, &output));
215 EXPECT_TRUE(Truncated("\x93" "abc\x94", 5, &output));
219 EXPECT_TRUE(Truncated("\xd9\xee\xe4\xee", 4, &output));
223 EXPECT_TRUE(Truncated("\xe3\xe5\xe9\xdC", 4, &output));