Lines Matching refs:expected
21 struct can_frame expected = { 0 }; in ZTEST() local
30 expected.flags = CAN_FRAME_IDE; in ZTEST()
31 expected.id = 1234U; in ZTEST()
32 expected.dlc = can_bytes_to_dlc(sizeof(data)); in ZTEST()
33 memcpy(expected.data, data, sizeof(data)); in ZTEST()
39 LOG_HEXDUMP_DBG((const uint8_t *)&expected, sizeof(expected), "expected"); in ZTEST()
41 zassert_equal(zframe.flags, expected.flags, "Flags not equal"); in ZTEST()
42 zassert_equal(zframe.id, expected.id, "CAN id invalid"); in ZTEST()
43 zassert_equal(zframe.dlc, expected.dlc, "Msg length invalid"); in ZTEST()
44 zassert_mem_equal(&zframe.data, &expected.data, can_dlc_to_bytes(expected.dlc), in ZTEST()
49 expected.flags |= CAN_FRAME_RTR; in ZTEST()
53 zassert_equal(zframe.flags, expected.flags, "Flags not equal"); in ZTEST()
54 zassert_equal(zframe.id, expected.id, "CAN id invalid"); in ZTEST()
63 struct socketcan_frame expected = { 0 }; in ZTEST() local
68 expected.can_id = BIT(31) | 1234; in ZTEST()
69 expected.len = sizeof(data); in ZTEST()
70 memcpy(expected.data, data, sizeof(expected.data)); in ZTEST()
81 LOG_HEXDUMP_DBG((const uint8_t *)&expected, sizeof(expected), "expected"); in ZTEST()
83 zassert_equal(sframe.can_id, expected.can_id, "CAN ID not same"); in ZTEST()
84 zassert_equal(sframe.len, expected.len, "CAN msg length not same"); in ZTEST()
85 zassert_mem_equal(&sframe.data, &expected.data, sizeof(sframe.data), "CAN data not same"); in ZTEST()
88 expected.can_id |= BIT(30); in ZTEST()
92 zassert_equal(sframe.can_id, expected.can_id, "CAN ID not same"); in ZTEST()
101 struct can_filter expected = { 0 }; in ZTEST() local
107 expected.flags = CAN_FILTER_IDE; in ZTEST()
108 expected.id = 1234U; in ZTEST()
109 expected.mask = 1234U; in ZTEST()
115 LOG_HEXDUMP_DBG((const uint8_t *)&expected, sizeof(expected), "expected"); in ZTEST()
117 zassert_equal(zfilter.flags, expected.flags, "Flags not equal"); in ZTEST()
118 zassert_equal(zfilter.id, expected.id, "CAN id invalid"); in ZTEST()
119 zassert_equal(zfilter.mask, expected.mask, "id mask not set"); in ZTEST()
128 struct socketcan_filter expected = { 0 }; in ZTEST() local
131 expected.can_id = BIT(31) | 1234; in ZTEST()
132 expected.can_mask = BIT(31) | 1234; in ZTEST()
134 expected.can_mask |= BIT(30); in ZTEST()
145 LOG_HEXDUMP_DBG((const uint8_t *)&expected, sizeof(expected), "expected"); in ZTEST()
147 zassert_equal(sfilter.can_id, expected.can_id, "CAN ID not same"); in ZTEST()
148 zassert_equal(sfilter.can_mask, expected.can_mask, "CAN mask not same"); in ZTEST()