• Home
  • Raw
  • Download

Lines Matching refs:blob

26   const Blob blob(std::begin(kTestBytes), std::end(kTestBytes));  in TEST()  local
27 const string obtained_string = BlobToString(blob); in TEST()
31 EXPECT_EQ(blob, obtained_blob); in TEST()
77 SecureBlob blob(32); in TEST_F() local
79 EXPECT_EQ(32, blob.size()); in TEST_F()
84 SecureBlob blob(32, 'a'); in TEST_F() local
86 for (size_t i = 0; i < blob.size(); i++) { in TEST_F()
87 EXPECT_EQ('a', blob[i]); in TEST_F()
93 SecureBlob blob(32, 0); in TEST_F() local
95 for (size_t i = 0; i < blob.size(); i++) { in TEST_F()
96 EXPECT_EQ(0, blob[i]); in TEST_F()
105 SecureBlob blob(std::begin(from_data), std::end(from_data)); in TEST_F() local
107 EXPECT_EQ(sizeof(from_data), blob.size()); in TEST_F()
110 EXPECT_EQ(from_data[i], blob[i]); in TEST_F()
117 const Blob blob(bytes); in TEST_F() local
118 const SecureBlob secure_blob(blob); in TEST_F()
128 SecureBlob blob(std::begin(from_data), std::end(from_data)); in TEST_F() local
130 EXPECT_EQ(sizeof(from_data), blob.size()); in TEST_F()
133 for (auto it = blob.begin(); it != blob.end(); ++it) { in TEST_F()
144 SecureBlob blob; in TEST_F() local
145 blob.assign(std::begin(from_data), std::end(from_data)); in TEST_F()
147 EXPECT_EQ(sizeof(from_data), blob.size()); in TEST_F()
150 for (auto it = blob.begin(); it != blob.end(); ++it) { in TEST_F()
156 blob2.assign(blob.begin(), blob.end()); in TEST_F()
158 EXPECT_EQ(blob, blob2); in TEST_F()
169 SecureBlob blob(length); in TEST_F() local
170 void* original_data = blob.data(); in TEST_F()
172 blob[i] = i; in TEST_F()
175 blob.resize(length - 1); in TEST_F()
177 EXPECT_EQ(original_data, blob.data()); in TEST_F()
178 EXPECT_EQ(length - 1, blob.size()); in TEST_F()
179 EXPECT_EQ(0, blob.data()[length - 1]); in TEST_F()
200 SecureBlob blob = SecureBlob(test_string.begin(), test_string.end()); in TEST_F() local
201 EXPECT_EQ(blob.size(), test_string.length()); in TEST_F()
202 std::string result_string = blob.to_string(); in TEST_F()
209 SecureBlob blob; in TEST_F() local
210 SecureBlob::HexStringToSecureBlob(hex_string, &blob); in TEST_F()
212 EXPECT_EQ(blob.size(), 16u); in TEST_F()
213 EXPECT_EQ(blob[0], 0x11); in TEST_F()
214 EXPECT_EQ(blob[1], 0x22); in TEST_F()
215 EXPECT_EQ(blob[2], 0x33); in TEST_F()
216 EXPECT_EQ(blob[3], 0x44); in TEST_F()
217 EXPECT_EQ(blob[4], 0x55); in TEST_F()
218 EXPECT_EQ(blob[5], 0x66); in TEST_F()
219 EXPECT_EQ(blob[6], 0x77); in TEST_F()
220 EXPECT_EQ(blob[7], 0x88); in TEST_F()
221 EXPECT_EQ(blob[8], 0x99); in TEST_F()
222 EXPECT_EQ(blob[9], 0xaa); in TEST_F()
223 EXPECT_EQ(blob[10], 0xbb); in TEST_F()
224 EXPECT_EQ(blob[11], 0xcc); in TEST_F()
225 EXPECT_EQ(blob[12], 0xdd); in TEST_F()
226 EXPECT_EQ(blob[13], 0xee); in TEST_F()
227 EXPECT_EQ(blob[14], 0xff); in TEST_F()
228 EXPECT_EQ(blob[15], 0x0f); in TEST_F()