85 assert_true(data->
pis.
id == 1);
97 assert_int_equal(data->
pis.
id, 1);
111 assert_true(data->
pis.
id == 1);
124 assert_int_equal(data->
pis.
id, 1);
157 assert_int_equal(data->
pis.
id, 1);
226 assert_int_equal(buf.
len, 8);
227 uint8_t expected_header[8] = { 0x00, 0x23, 0, 0, 0, 0, 0, 1};
228 assert_memory_equal(
BPTR(&buf), expected_header, 8);
235 data->pis.id = 0xfa079ab9d2e8;
238 uint8_t expected_header_48[8] = { 0xff, 0xfe, 0xfa, 0x07, 0x9a, 0xb9, 0xd2, 0xe9};
239 assert_memory_equal(
BPTR(&buf_48), expected_header_48, 8);
243 data->pis.id = 0xfffffffffffe;
246 uint8_t expected_header_of[8] = { 0xf0, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
247 assert_memory_equal(
BPTR(&buf_of), expected_header_of, 8);
256 assert_int_equal(pin.
id, 1);
259 assert_int_equal(pin.
id, 0xfa079ab9d2e9);
262 assert_int_equal(pin.
id, 0xffffffffffff);
274 assert_int_equal(mru_ack.
len, 3);
275 assert_int_equal(mru_ack.
packet_id[0], 2);
276 assert_int_equal(mru_ack.
packet_id[1], 1);
277 assert_int_equal(mru_ack.
packet_id[2], 3);
281 assert_int_equal(mru_ack.
len, 3);
282 assert_int_equal(mru_ack.
packet_id[0], 2);
283 assert_int_equal(mru_ack.
packet_id[1], 1);
284 assert_int_equal(mru_ack.
packet_id[2], 3);
290 assert_int_equal(mru_ack2.
packet_id[0], 2);
291 assert_int_equal(mru_ack2.
packet_id[1], 1);
292 assert_int_equal(mru_ack2.
packet_id[2], 3);
298 assert_int_equal(mru_ack2.
packet_id[0], 3);
299 assert_int_equal(mru_ack2.
packet_id[1], 2);
300 assert_int_equal(mru_ack2.
packet_id[2], 1);
305 assert_int_equal(mru_ack.
len, 3);
306 assert_int_equal(mru_ack.
packet_id[0], 2);
307 assert_int_equal(mru_ack.
packet_id[1], 1);
308 assert_int_equal(mru_ack.
packet_id[2], 3);
312 assert_int_equal(mru_ack.
len, 3);
313 assert_int_equal(mru_ack.
packet_id[0], 2);
314 assert_int_equal(mru_ack.
packet_id[1], 1);
315 assert_int_equal(mru_ack.
packet_id[2], 3);
317 struct reliable_ack ack3 = { .
len = 7, .packet_id = {5, 6, 7, 8, 9, 10, 11}};
322 struct reliable_ack expected_ack = { .
len = 8, .packet_id = {5, 6, 7, 8, 9, 10, 11, 2}};
323 assert_int_equal(mru_ack.
len, expected_ack.
len);
332 const struct CMUnitTest tests[] = {
360 return cmocka_run_group_tests_name(
"packet_id tests", tests, NULL, NULL);