Lines Matching refs:data

24 static uint8_t data[] = {
32 assert_se(unaligned_read_be16(&data[0]) == 0x0001);
33 assert_se(unaligned_read_be16(&data[1]) == 0x0102);
35 assert_se(unaligned_read_be32(&data[0]) == 0x00010203);
36 assert_se(unaligned_read_be32(&data[1]) == 0x01020304);
37 assert_se(unaligned_read_be32(&data[2]) == 0x02030405);
38 assert_se(unaligned_read_be32(&data[3]) == 0x03040506);
40 assert_se(unaligned_read_be64(&data[0]) == 0x0001020304050607);
41 assert_se(unaligned_read_be64(&data[1]) == 0x0102030405060708);
42 assert_se(unaligned_read_be64(&data[2]) == 0x0203040506070809);
43 assert_se(unaligned_read_be64(&data[3]) == 0x030405060708090a);
44 assert_se(unaligned_read_be64(&data[4]) == 0x0405060708090a0b);
45 assert_se(unaligned_read_be64(&data[5]) == 0x05060708090a0b0c);
46 assert_se(unaligned_read_be64(&data[6]) == 0x060708090a0b0c0d);
47 assert_se(unaligned_read_be64(&data[7]) == 0x0708090a0b0c0d0e);
51 assert_se(memcmp(&scratch[0], &data[0], sizeof(uint16_t)) == 0);
54 assert_se(memcmp(&scratch[1], &data[1], sizeof(uint16_t)) == 0);
58 assert_se(memcmp(&scratch[0], &data[0], sizeof(uint32_t)) == 0);
61 assert_se(memcmp(&scratch[1], &data[1], sizeof(uint32_t)) == 0);
64 assert_se(memcmp(&scratch[2], &data[2], sizeof(uint32_t)) == 0);
67 assert_se(memcmp(&scratch[3], &data[3], sizeof(uint32_t)) == 0);
71 assert_se(memcmp(&scratch[0], &data[0], sizeof(uint64_t)) == 0);
74 assert_se(memcmp(&scratch[1], &data[1], sizeof(uint64_t)) == 0);
77 assert_se(memcmp(&scratch[2], &data[2], sizeof(uint64_t)) == 0);
80 assert_se(memcmp(&scratch[3], &data[3], sizeof(uint64_t)) == 0);
83 assert_se(memcmp(&scratch[4], &data[4], sizeof(uint64_t)) == 0);
86 assert_se(memcmp(&scratch[5], &data[5], sizeof(uint64_t)) == 0);
89 assert_se(memcmp(&scratch[6], &data[6], sizeof(uint64_t)) == 0);
92 assert_se(memcmp(&scratch[7], &data[7], sizeof(uint64_t)) == 0);
98 assert_se(unaligned_read_le16(&data[0]) == 0x0100);
99 assert_se(unaligned_read_le16(&data[1]) == 0x0201);
101 assert_se(unaligned_read_le32(&data[0]) == 0x03020100);
102 assert_se(unaligned_read_le32(&data[1]) == 0x04030201);
103 assert_se(unaligned_read_le32(&data[2]) == 0x05040302);
104 assert_se(unaligned_read_le32(&data[3]) == 0x06050403);
106 assert_se(unaligned_read_le64(&data[0]) == 0x0706050403020100);
107 assert_se(unaligned_read_le64(&data[1]) == 0x0807060504030201);
108 assert_se(unaligned_read_le64(&data[2]) == 0x0908070605040302);
109 assert_se(unaligned_read_le64(&data[3]) == 0x0a09080706050403);
110 assert_se(unaligned_read_le64(&data[4]) == 0x0b0a090807060504);
111 assert_se(unaligned_read_le64(&data[5]) == 0x0c0b0a0908070605);
112 assert_se(unaligned_read_le64(&data[6]) == 0x0d0c0b0a09080706);
113 assert_se(unaligned_read_le64(&data[7]) == 0x0e0d0c0b0a090807);
117 assert_se(memcmp(&scratch[0], &data[0], sizeof(uint16_t)) == 0);
120 assert_se(memcmp(&scratch[1], &data[1], sizeof(uint16_t)) == 0);
125 assert_se(memcmp(&scratch[0], &data[0], sizeof(uint32_t)) == 0);
128 assert_se(memcmp(&scratch[1], &data[1], sizeof(uint32_t)) == 0);
131 assert_se(memcmp(&scratch[2], &data[2], sizeof(uint32_t)) == 0);
134 assert_se(memcmp(&scratch[3], &data[3], sizeof(uint32_t)) == 0);
138 assert_se(memcmp(&scratch[0], &data[0], sizeof(uint64_t)) == 0);
141 assert_se(memcmp(&scratch[1], &data[1], sizeof(uint64_t)) == 0);
144 assert_se(memcmp(&scratch[2], &data[2], sizeof(uint64_t)) == 0);
147 assert_se(memcmp(&scratch[3], &data[3], sizeof(uint64_t)) == 0);
150 assert_se(memcmp(&scratch[4], &data[4], sizeof(uint64_t)) == 0);
153 assert_se(memcmp(&scratch[5], &data[5], sizeof(uint64_t)) == 0);
156 assert_se(memcmp(&scratch[6], &data[6], sizeof(uint64_t)) == 0);
159 assert_se(memcmp(&scratch[7], &data[7], sizeof(uint64_t)) == 0);