Lines Matching refs:ByteString

56   ByteString bs1(0);
65 ByteString bs1(kTest1, sizeof(kTest1));
77 // Build a ByteString (different to bs1), verify that the new ByteString
79 ByteString bs2(kTest2, sizeof(kTest2));
88 // Build _another_ ByteString (different to bs1 and bs2), verify that the
89 // new ByteString looks as expected, verify that it's different to bs1 and
91 ByteString bs3(kTest3, sizeof(kTest3));
102 ByteString bs6(kTest1, sizeof(kTest1));
107 ByteString bs4(string(kTest4), false);
111 ByteString bs5(string(kTest4), true);
117 ByteString bs1(kTest1, sizeof(kTest1));
118 ByteString fragment(kTest1 + 3, 4);
121 ByteString end_fragment(kTest1 + kMargin, sizeof(kTest1) - kMargin);
124 // Verify that the ByteString correctly handles accessing a substring
125 // outside the range of the ByteString.
131 ByteString bs1 = ByteString::CreateFromNetUInt32(kTest2Uint32);
140 ByteString bs2(kTest2, sizeof(kTest2));
145 ByteString bs3 = ByteString::CreateFromCPUUInt32(0x1020304);
160 ByteString bs(kTest2, sizeof(kTest2));
178 ByteString bs(kTest2, sizeof(kTest2));
183 ByteString bs1(kTest1, sizeof(kTest1));
186 EXPECT_FALSE(bs1.BitwiseAnd(ByteString(kTest2, sizeof(kTest2))));
187 EXPECT_TRUE(bs1.Equals(ByteString(kTest1, sizeof(kTest1))));
189 const ByteString bs6(kTest6, sizeof(kTest6));
193 const ByteString expected_result(kAndResult, sizeof(kAndResult));
198 ByteString bs1(kTest1, sizeof(kTest1));
201 EXPECT_FALSE(bs1.BitwiseOr(ByteString(kTest2, sizeof(kTest2))));
202 EXPECT_TRUE(bs1.Equals(ByteString(kTest1, sizeof(kTest1))));
204 const ByteString bs6(kTest6, sizeof(kTest6));
208 const ByteString expected_result(kOrResult, sizeof(kOrResult));
213 ByteString bs(kTest1, sizeof(kTest1));
214 ByteString invert;
217 invert.Append(ByteString(&val, 1));
224 ByteString bs = ByteString::CreateFromHexString("");
227 ByteString bs1 = ByteString::CreateFromHexString("0");
230 ByteString bs2 = ByteString::CreateFromHexString("0y");
233 ByteString bs3 = ByteString::CreateFromHexString("ab");
237 ByteString bs4 = ByteString::CreateFromHexString(kTest1HexString);
242 ByteString bs1;
246 // Conversion should fail when the length of ByteString is not a
248 ByteString bs2(kTest1, sizeof(kTest1));
253 // Conversion should succeed when the length of ByteString is a
266 ByteString bs1;
270 // Conversion should fail when the length of ByteString is not a
272 ByteString bs2(kTest1, sizeof(kTest1));
277 // Conversion should succeed when the length of ByteString is a
290 ByteString bs1(kTest1, sizeof(kTest1));
291 ByteString bs2(kTest2, sizeof(kTest2));
292 ByteString bs3(kTest3, sizeof(kTest3));
293 ByteString bs5(kTest5, sizeof(kTest5));
296 EXPECT_TRUE(ByteString::IsLessThan(bs1, bs2));
299 EXPECT_TRUE(ByteString::IsLessThan(bs3, bs2));
303 EXPECT_TRUE(ByteString::IsLessThan(bs3, bs1));
307 EXPECT_TRUE(ByteString::IsLessThan(bs5, bs2));
310 EXPECT_FALSE(ByteString::IsLessThan(bs5, bs5));