Lines Matching refs:p

31     ipmi::message::Payload p(std::forward<ipmi::SecureBuffer>(i));  in TEST()  local
32 ASSERT_EQ(input_size, p.size()); in TEST()
37 ipmi::message::Payload p; in TEST() local
38 ASSERT_EQ(0, p.size()); in TEST()
40 p.pack(i); in TEST()
41 ASSERT_EQ(i.size(), p.size()); in TEST()
42 p.pack(i); in TEST()
43 p.pack(i); in TEST()
44 ASSERT_EQ(3 * i.size(), p.size()); in TEST()
50 ipmi::message::Payload p; in TEST() local
51 p.pack(i); in TEST()
52 p.resize(16); in TEST()
53 ASSERT_EQ(p.size(), 16); in TEST()
59 ipmi::message::Payload p; in TEST() local
60 p.pack(i); in TEST()
61 ASSERT_NE(nullptr, p.data()); in TEST()
67 ipmi::message::Payload p; in TEST() local
68 p.append(s.data(), s.data() + s.size()); in TEST()
69 ASSERT_EQ(s.size(), p.size()); in TEST()
75 ipmi::message::Payload p; in TEST() local
78 p.pack(b); in TEST()
79 p.append(s.data(), s.data() + s.size()); in TEST()
81 ASSERT_EQ(s.size() + 1, p.size()); in TEST()
86 ipmi::message::Payload p; in TEST() local
87 p.appendBits(3, 0b101); in TEST()
88 ASSERT_EQ(p.bitStream, 0b101); in TEST()
89 p.appendBits(4, 0b1100); in TEST()
90 ASSERT_EQ(p.bitStream, 0b1100101); in TEST()
91 p.appendBits(1, 0b1); in TEST()
92 ASSERT_EQ(p.bitStream, 0); in TEST()
93 ASSERT_EQ(p.bitCount, 0); in TEST()
95 ASSERT_EQ(p.size(), 1); in TEST()
97 ASSERT_EQ(p.raw, k1); in TEST()
98 p.appendBits(7, 0b1110111); in TEST()
100 ASSERT_EQ(p.size(), 1); in TEST()
101 p.drain(); in TEST()
103 ASSERT_EQ(p.size(), 2); in TEST()
105 ASSERT_EQ(p.raw, k2); in TEST()
110 ipmi::message::Payload p; in TEST() local
111 p.bitStream = 0b1011010011001111; in TEST()
112 p.bitCount = 16; in TEST()
113 p.drain(); in TEST()
114 ASSERT_EQ(p.size(), 2); in TEST()
115 ASSERT_EQ(p.bitCount, 0); in TEST()
116 ASSERT_EQ(p.bitStream, 0); in TEST()
118 ASSERT_EQ(p.raw, k1); in TEST()
123 ipmi::message::Payload p; in TEST() local
124 p.bitStream = 0b101101001100111; in TEST()
125 p.bitCount = 15; in TEST()
126 p.drain(); in TEST()
127 ASSERT_EQ(p.size(), 2); in TEST()
128 ASSERT_EQ(p.bitCount, 0); in TEST()
129 ASSERT_EQ(p.bitStream, 0); in TEST()
131 ASSERT_EQ(p.raw, k1); in TEST()
136 ipmi::message::Payload p; in TEST() local
137 p.bitStream = 0b101101001100111; in TEST()
138 p.bitCount = 15; in TEST()
139 p.drain(true); in TEST()
141 ASSERT_EQ(p.size(), 1); in TEST()
142 ASSERT_EQ(p.bitCount, 7); in TEST()
143 ASSERT_EQ(p.bitStream, 0b1011010); in TEST()
145 ASSERT_EQ(p.raw, k1); in TEST()
151 ipmi::message::Payload p(std::forward<ipmi::SecureBuffer>(i)); in TEST() local
152 const auto& [vb, ve] = p.pop<uint8_t>(4); in TEST()
161 ipmi::message::Payload p(std::forward<ipmi::SecureBuffer>(i)); in TEST() local
162 p.fillBits(5); in TEST()
163 ASSERT_FALSE(p.unpackError); in TEST()
164 ASSERT_EQ(p.bitStream, 0xbf); in TEST()
165 ASSERT_EQ(p.bitCount, 8); in TEST()
167 p.fillBits(5); in TEST()
168 ASSERT_FALSE(p.unpackError); in TEST()
169 ASSERT_EQ(p.bitStream, 0xbf); in TEST()
170 ASSERT_EQ(p.bitCount, 8); in TEST()
172 p.popBits(5); in TEST()
174 p.fillBits(5); in TEST()
175 ASSERT_FALSE(p.unpackError); in TEST()
176 ASSERT_EQ(p.bitStream, 0x25); in TEST()
177 ASSERT_EQ(p.bitCount, 11); in TEST()
183 ipmi::message::Payload p(std::forward<ipmi::SecureBuffer>(i)); in TEST() local
184 p.fillBits(72); in TEST()
185 ASSERT_TRUE(p.unpackError); in TEST()
191 ipmi::message::Payload p(std::forward<ipmi::SecureBuffer>(i)); in TEST() local
192 p.fillBits(48); in TEST()
193 ASSERT_TRUE(p.unpackError); in TEST()
199 ipmi::message::Payload p(std::forward<ipmi::SecureBuffer>(i)); in TEST() local
200 p.fillBits(4); in TEST()
201 uint8_t v = p.popBits(4); in TEST()
202 ASSERT_FALSE(p.unpackError); in TEST()
203 ASSERT_EQ(p.bitStream, 0x0b); in TEST()
204 ASSERT_EQ(p.bitCount, 4); in TEST()
211 ipmi::message::Payload p(std::forward<ipmi::SecureBuffer>(i)); in TEST() local
212 p.popBits(4); in TEST()
213 ASSERT_TRUE(p.unpackError); in TEST()
219 ipmi::message::Payload p(std::forward<ipmi::SecureBuffer>(i)); in TEST() local
220 p.fillBits(5); in TEST()
221 ASSERT_FALSE(p.unpackError); in TEST()
222 ASSERT_EQ(p.bitStream, 0xbf); in TEST()
223 ASSERT_EQ(p.bitCount, 8); in TEST()
224 p.discardBits(); in TEST()
225 ASSERT_FALSE(p.unpackError); in TEST()
226 ASSERT_EQ(p.bitStream, 0); in TEST()
227 ASSERT_EQ(p.bitCount, 0); in TEST()
233 ipmi::message::Payload p(std::forward<ipmi::SecureBuffer>(i)); in TEST() local
235 p.unpack(v1); in TEST()
237 ASSERT_FALSE(p.fullyUnpacked()); in TEST()
238 p.fillBits(3); in TEST()
239 p.popBits(3); in TEST()
241 ASSERT_FALSE(p.fullyUnpacked()); in TEST()
242 p.fillBits(5); in TEST()
243 p.popBits(5); in TEST()
245 ASSERT_TRUE(p.fullyUnpacked()); in TEST()
246 p.fillBits(4); in TEST()
248 ASSERT_FALSE(p.fullyUnpacked()); in TEST()
254 ipmi::message::Payload p(std::forward<ipmi::SecureBuffer>(i)); in TEST() local
255 p.fillBits(4); in TEST()
256 p.unpackError = true; in TEST()
257 p.reset(); in TEST()
258 ASSERT_EQ(p.rawIndex, 0); in TEST()
259 ASSERT_EQ(p.bitStream, 0); in TEST()
260 ASSERT_EQ(p.bitCount, 0); in TEST()
261 ASSERT_FALSE(p.unpackError); in TEST()
270 ipmi::message::Payload p(std::forward<ipmi::SecureBuffer>(i)); in TEST() local
273 ASSERT_EQ(p.unpack(v1), 0); in TEST()
275 ASSERT_FALSE(p.fullyUnpacked()); in TEST()
280 p.reset(); in TEST()
284 ASSERT_EQ(p.unpack(v2), 0); in TEST()
286 ASSERT_TRUE(p.fullyUnpacked()); in TEST()
295 ipmi::message::Payload p(std::forward<ipmi::SecureBuffer>(i)); in TEST() local
299 ASSERT_EQ(p.unpack(v1, localPayload), 0); in TEST()
301 ASSERT_FALSE(p.fullyUnpacked()); in TEST()
302 ASSERT_FALSE(p.unpackError); in TEST()
339 ipmi::message::Payload p({1, 2}); in TEST_F() local
347 ipmi::message::Payload p({1, 2}); in TEST_F() local
348 p.trailingOk = false; in TEST_F()
356 ipmi::message::Payload p({1, 2}); in TEST_F() local
357 p.trailingOk = false; in TEST_F()
359 p.unpack(out, out); in TEST_F()
367 ipmi::message::Payload p({1, 2}); in TEST_F() local
368 p.trailingOk = false; in TEST_F()
370 p.unpack(out); in TEST_F()
378 ipmi::message::Payload p({1, 2}); in TEST_F() local
379 p.trailingOk = false; in TEST_F()
380 EXPECT_FALSE(p.fullyUnpacked()); in TEST_F()
388 ipmi::message::Payload p({1, 2}); in TEST_F() local
389 p.trailingOk = false; in TEST_F()
391 p.unpack(out, out); in TEST_F()
392 EXPECT_TRUE(p.fullyUnpacked()); in TEST_F()
400 ipmi::message::Payload p; in TEST_F() local
404 q.unpack(p); in TEST_F()
414 ipmi::message::Payload p; in TEST_F() local
418 p = std::move(q); in TEST_F()
429 ipmi::message::Payload p({1, 2}); in TEST_F() local
430 p.trailingOk = false; in TEST_F()