Lines Matching refs:blob

25   const Blob blob(std::begin(kTestBytes), std::end(kTestBytes));  in TEST()  local
26 const string obtained_string = BlobToString(blob); in TEST()
30 EXPECT_EQ(blob, obtained_blob); in TEST()
76 SecureBlob blob(32); in TEST_F() local
78 EXPECT_EQ(32, blob.size()); in TEST_F()
83 SecureBlob blob(32, 'a'); in TEST_F() local
85 for (size_t i = 0; i < blob.size(); i++) { in TEST_F()
86 EXPECT_EQ('a', blob[i]); in TEST_F()
92 SecureBlob blob(32, 0); in TEST_F() local
94 for (size_t i = 0; i < blob.size(); i++) { in TEST_F()
95 EXPECT_EQ(0, blob[i]); in TEST_F()
104 SecureBlob blob(std::begin(from_data), std::end(from_data)); in TEST_F() local
106 EXPECT_EQ(sizeof(from_data), blob.size()); in TEST_F()
109 EXPECT_EQ(from_data[i], blob[i]); in TEST_F()
116 const Blob blob(bytes); in TEST_F() local
117 const SecureBlob secure_blob(blob); in TEST_F()
127 SecureBlob blob(std::begin(from_data), std::end(from_data)); in TEST_F() local
129 EXPECT_EQ(sizeof(from_data), blob.size()); in TEST_F()
132 for (auto it = blob.begin(); it != blob.end(); ++it) { in TEST_F()
143 SecureBlob blob; in TEST_F() local
144 blob.assign(std::begin(from_data), std::end(from_data)); in TEST_F()
146 EXPECT_EQ(sizeof(from_data), blob.size()); in TEST_F()
149 for (auto it = blob.begin(); it != blob.end(); ++it) { in TEST_F()
155 blob2.assign(blob.begin(), blob.end()); in TEST_F()
157 EXPECT_EQ(blob, blob2); in TEST_F()
168 SecureBlob blob(length); in TEST_F() local
169 void* original_data = blob.data(); in TEST_F()
171 blob[i] = i; in TEST_F()
174 blob.resize(length - 1); in TEST_F()
176 EXPECT_EQ(original_data, blob.data()); in TEST_F()
177 EXPECT_EQ(length - 1, blob.size()); in TEST_F()
178 EXPECT_EQ(0, blob.data()[length - 1]); in TEST_F()
199 SecureBlob blob = SecureBlob(test_string.begin(), test_string.end()); in TEST_F() local
200 EXPECT_EQ(blob.size(), test_string.length()); in TEST_F()
201 std::string result_string = blob.to_string(); in TEST_F()
208 SecureBlob blob; in TEST_F() local
209 SecureBlob::HexStringToSecureBlob(hex_string, &blob); in TEST_F()
211 EXPECT_EQ(blob.size(), 16u); in TEST_F()
212 EXPECT_EQ(blob[0], 0x11); in TEST_F()
213 EXPECT_EQ(blob[1], 0x22); in TEST_F()
214 EXPECT_EQ(blob[2], 0x33); in TEST_F()
215 EXPECT_EQ(blob[3], 0x44); in TEST_F()
216 EXPECT_EQ(blob[4], 0x55); in TEST_F()
217 EXPECT_EQ(blob[5], 0x66); in TEST_F()
218 EXPECT_EQ(blob[6], 0x77); in TEST_F()
219 EXPECT_EQ(blob[7], 0x88); in TEST_F()
220 EXPECT_EQ(blob[8], 0x99); in TEST_F()
221 EXPECT_EQ(blob[9], 0xaa); in TEST_F()
222 EXPECT_EQ(blob[10], 0xbb); in TEST_F()
223 EXPECT_EQ(blob[11], 0xcc); in TEST_F()
224 EXPECT_EQ(blob[12], 0xdd); in TEST_F()
225 EXPECT_EQ(blob[13], 0xee); in TEST_F()
226 EXPECT_EQ(blob[14], 0xff); in TEST_F()
227 EXPECT_EQ(blob[15], 0x0f); in TEST_F()