Lines Matching refs:p
25 ipmi::message::Payload p; in TEST() local
27 p.pack(v); in TEST()
29 ASSERT_EQ(p.size(), sizeof(v)); in TEST()
32 ASSERT_EQ(p.raw, k); in TEST()
37 ipmi::message::Payload p; in TEST() local
39 p.pack(v); in TEST()
41 ASSERT_EQ(p.size(), sizeof(v)); in TEST()
44 ASSERT_EQ(p.raw, k); in TEST()
49 ipmi::message::Payload p; in TEST() local
51 p.pack(v); in TEST()
53 ASSERT_EQ(p.size(), sizeof(v)); in TEST()
56 ASSERT_EQ(p.raw, k); in TEST()
61 ipmi::message::Payload p; in TEST() local
63 p.pack(v); in TEST()
65 ASSERT_EQ(p.size(), sizeof(v)); in TEST()
68 ASSERT_EQ(p.raw, k); in TEST()
73 ipmi::message::Payload p; in TEST() local
75 p.pack(v); in TEST()
77 ASSERT_EQ(p.size(), types::nrFixedBits<decltype(v)> / CHAR_BIT); in TEST()
80 ASSERT_EQ(p.raw, k); in TEST()
87 ipmi::message::Payload p; in TEST() local
90 p.pack(v1, v2); in TEST()
92 ASSERT_EQ(p.size(), (types::nrFixedBits<decltype(v1)> + in TEST()
97 ASSERT_EQ(p.raw, k); in TEST()
104 ipmi::message::Payload p; in TEST() local
107 p.pack(v1, v2, v3, v4, v5, v6, v7, v8); in TEST()
109 ASSERT_EQ(p.size(), sizeof(uint8_t)); in TEST()
112 ASSERT_EQ(p.raw, k); in TEST()
119 ipmi::message::Payload p; in TEST() local
121 p.pack(v); in TEST()
123 ASSERT_EQ(p.size(), v.size() / CHAR_BIT); in TEST()
126 ASSERT_EQ(p.raw, k); in TEST()
133 ipmi::message::Payload p; in TEST() local
136 p.pack(v1, v2); in TEST()
138 ASSERT_EQ(p.size(), (v1.size() + v2.size()) / CHAR_BIT); in TEST()
141 ASSERT_EQ(p.raw, k); in TEST()
149 ipmi::message::Payload p; in TEST() local
151 p.pack(v); in TEST()
153 ASSERT_EQ(p.size(), v.size() / CHAR_BIT); in TEST()
156 ASSERT_EQ(p.raw, k); in TEST()
162 ipmi::message::Payload p; in TEST() local
164 p.pack(v); in TEST()
166 ASSERT_EQ(p.size(), sizeof(uint16_t) + sizeof(char)); in TEST()
169 ASSERT_EQ(p.raw, k); in TEST()
175 ipmi::message::Payload p; in TEST() local
177 p.pack(v); in TEST()
179 ASSERT_EQ(p.size(), v.size() * sizeof(v[0])); in TEST()
182 ASSERT_EQ(p.raw, k); in TEST()
193 ipmi::message::Payload p; in TEST() local
196 p.pack(v); in TEST()
198 ASSERT_EQ(p.size(), v.size() * sizeof(v[0])); in TEST()
202 ASSERT_EQ(p.raw, k); in TEST()
213 ipmi::message::Payload p; in TEST() local
216 p.pack(v); in TEST()
218 ASSERT_EQ(p.size(), v.size() * sizeof(v[0])); in TEST()
222 ASSERT_EQ(p.raw, k); in TEST()
228 ipmi::message::Payload p; in TEST() local
230 p.pack(v); in TEST()
232 ASSERT_EQ(p.size(), v.size() * sizeof(v[0])); in TEST()
235 ASSERT_EQ(p.raw, k); in TEST()
240 ipmi::message::Payload p; in TEST() local
241 EXPECT_EQ(p.pack(true, std::vector<uint8_t>{1}), 1); in TEST()
242 EXPECT_EQ(p.raw, ipmi::SecureBuffer{0b1}); in TEST()
247 ipmi::message::Payload p; in TEST() local
248 EXPECT_EQ(p.pack(std::string_view{"\x24\x30\x11"}), 0); in TEST()
249 EXPECT_EQ(p.raw, ipmi::SecureBuffer({0x24, 0x30, 0x11})); in TEST()
254 ipmi::message::Payload p; in TEST() local
255 EXPECT_EQ(p.pack(true, std::string_view{"abc"}), 1); in TEST()
256 EXPECT_EQ(p.raw, ipmi::SecureBuffer({0b1})); in TEST()
262 ipmi::message::Payload p; in TEST() local
264 p.pack(v); in TEST()
266 ASSERT_EQ(p.size(), 0); in TEST()
269 ASSERT_EQ(p.raw, k); in TEST()
275 ipmi::message::Payload p; in TEST() local
277 p.pack(v); in TEST()
279 ASSERT_EQ(p.size(), sizeof(uint32_t)); in TEST()
282 ASSERT_EQ(p.raw, k); in TEST()
287 ipmi::message::Payload p; in TEST() local
288 EXPECT_EQ(p.pack(true), 0); in TEST()
289 EXPECT_EQ(p.pack(ipmi::message::Payload({0x24, 0x30})), 0); in TEST()
290 EXPECT_EQ(p.raw, ipmi::SecureBuffer({0b1, 0x24, 0x30})); in TEST()
295 ipmi::message::Payload p; in TEST() local
296 EXPECT_EQ(p.pack(true, ipmi::message::Payload({0x24})), 1); in TEST()
297 EXPECT_EQ(p.raw, ipmi::SecureBuffer({0b1})); in TEST()
302 ipmi::message::Payload p, q; in TEST() local
304 EXPECT_EQ(p.pack(true), 0); in TEST()
305 EXPECT_EQ(p.pack(q), 1); in TEST()
306 EXPECT_EQ(p.raw, ipmi::SecureBuffer({0b1})); in TEST()
311 ipmi::message::Payload p; in TEST() local
312 EXPECT_EQ(p.pack(true), 0); in TEST()
313 EXPECT_EQ(p.prepend(ipmi::message::Payload({0x24, 0x30})), 0); in TEST()
314 EXPECT_EQ(p.raw, ipmi::SecureBuffer({0x24, 0x30, 0b1})); in TEST()
319 ipmi::message::Payload p; in TEST() local
320 p.appendBits(1, 1); in TEST()
321 EXPECT_EQ(p.prepend(ipmi::message::Payload({0x24})), 1); in TEST()
322 p.drain(); in TEST()
323 EXPECT_EQ(p.raw, ipmi::SecureBuffer({0b1})); in TEST()
328 ipmi::message::Payload p, q; in TEST() local
330 EXPECT_EQ(p.pack(true), 0); in TEST()
331 EXPECT_EQ(p.prepend(q), 1); in TEST()
332 EXPECT_EQ(p.raw, ipmi::SecureBuffer({0b1})); in TEST()
342 ipmi::message::Payload p; in TEST() local
347 p.pack(v1, v2, v3, v4); in TEST()
349 ASSERT_EQ(p.size(), sizeof(v1) + sizeof(v2) + sizeof(v3) + sizeof(v4)); in TEST()
353 ASSERT_EQ(p.raw, k); in TEST()
363 ipmi::message::Payload p; in TEST() local
369 p.pack(v); in TEST()
371 ASSERT_EQ(p.size(), sizeof(v1) + sizeof(v2) + sizeof(v3) + sizeof(v4)); in TEST()
375 ASSERT_EQ(p.raw, k); in TEST()
380 ipmi::message::Payload p; in TEST() local
385 p.pack(variant); in TEST()
386 ASSERT_EQ(p.size(), sizeof(data)); in TEST()
390 ASSERT_EQ(p.raw, k); in TEST()
402 ipmi::message::Payload p; in TEST() local
409 p.pack(v1, v2, v3, v4, v5); in TEST()
411 ASSERT_EQ(p.size(), sizeof(uint16_t)); in TEST()
414 ASSERT_EQ(p.raw, k); in TEST()
432 ipmi::message::Payload p; in TEST() local
443 p.pack(v1, v2, v3, v4, v5, v6, v7); in TEST()
445 ASSERT_EQ(p.size(), sizeof(uint64_t)); in TEST()
448 ASSERT_EQ(p.raw, k); in TEST()
480 ipmi::message::Payload p; in TEST() local
481 p.pack(handle, maxSessions, currentSessions, activeSession, lanSession); in TEST()
482 ASSERT_EQ(p.size(), in TEST()
496 ASSERT_EQ(p.raw, k); in TEST()