Lines Matching refs:teststr

27   uint8_t teststr[] = {  0x40, 0x01, 0x93, 0x34 };  in t_parse_pdu1()  local
30 result = coap_pdu_parse((unsigned char *)teststr, sizeof(teststr), pdu); in t_parse_pdu1()
33 CU_ASSERT(pdu->length == sizeof(teststr)); in t_parse_pdu1()
38 CU_ASSERT(memcmp(&pdu->hdr->id, teststr + 2, 2) == 0); in t_parse_pdu1()
44 uint8_t teststr[] = { 0x55, 0x69, 0x12, 0x34, 't', 'o', 'k', 'e', 'n' }; in t_parse_pdu2() local
47 result = coap_pdu_parse((unsigned char *)teststr, sizeof(teststr), pdu); in t_parse_pdu2()
50 CU_ASSERT(pdu->length == sizeof(teststr)); in t_parse_pdu2()
55 CU_ASSERT(memcmp(&pdu->hdr->id, teststr + 2, 2) == 0); in t_parse_pdu2()
56 CU_ASSERT(memcmp(pdu->hdr->token, teststr + 4, 5) == 0); in t_parse_pdu2()
62 uint8_t teststr[] = { 0x53, 0x69, 0x12, 0x34, 't', 'o', 'k', 'e', 'n' }; in t_parse_pdu3() local
65 result = coap_pdu_parse((unsigned char *)teststr, sizeof(teststr), pdu); in t_parse_pdu3()
72 uint8_t teststr[] = { 0x59, 0x69, 0x12, 0x34, in t_parse_pdu4() local
76 result = coap_pdu_parse((unsigned char *)teststr, sizeof(teststr), pdu); in t_parse_pdu4()
79 teststr[0] = 0x5f; in t_parse_pdu4()
81 result = coap_pdu_parse((unsigned char *)teststr, sizeof(teststr), pdu); in t_parse_pdu4()
88 uint8_t teststr[] = { 0x55, 0x73, 0x12, 0x34, 't', 'o', 'k', 'e', in t_parse_pdu5() local
93 result = coap_pdu_parse((unsigned char *)teststr, sizeof(teststr), pdu); in t_parse_pdu5()
96 CU_ASSERT(pdu->length == sizeof(teststr)); in t_parse_pdu5()
101 CU_ASSERT(memcmp(&pdu->hdr->id, teststr + 2, 2) == 0); in t_parse_pdu5()
102 CU_ASSERT(memcmp(pdu->hdr->token, teststr + 4, 5) == 0); in t_parse_pdu5()
111 uint8_t teststr[] = { 0x55, 0x73, 0x12, 0x34, 't', 'o', 'k', 'e', in t_parse_pdu6() local
116 result = coap_pdu_parse((unsigned char *)teststr, sizeof(teststr), pdu); in t_parse_pdu6()
123 uint8_t teststr[] = { 0x55, 0x73, 0x12, 0x34, 't', 'o', 'k', 'e', in t_parse_pdu7() local
129 result = coap_pdu_parse((unsigned char *)teststr, sizeof(teststr), pdu); in t_parse_pdu7()
132 CU_ASSERT(pdu->length == sizeof(teststr)); in t_parse_pdu7()
137 CU_ASSERT(memcmp(&pdu->hdr->id, teststr + 2, 2) == 0); in t_parse_pdu7()
138 CU_ASSERT(memcmp(pdu->hdr->token, teststr + 4, 5) == 0); in t_parse_pdu7()
143 CU_ASSERT(memcmp(pdu->data, teststr + 13, 7) == 0); in t_parse_pdu7()
149 uint8_t teststr[] = { 0x50, 0x73, 0x12, 0x34, in t_parse_pdu8() local
155 result = coap_pdu_parse((unsigned char *)teststr, sizeof(teststr), pdu); in t_parse_pdu8()
158 CU_ASSERT(pdu->length == sizeof(teststr)); in t_parse_pdu8()
163 CU_ASSERT(memcmp(&pdu->hdr->id, teststr + 2, 2) == 0); in t_parse_pdu8()
168 CU_ASSERT(memcmp(pdu->data, teststr + 5, 7) == 0); in t_parse_pdu8()
174 uint8_t teststr[] = { 0x70, 0x00, 0x12, 0x34, 0xff }; in t_parse_pdu9() local
177 result = coap_pdu_parse((unsigned char *)teststr, sizeof(teststr), pdu); in t_parse_pdu9()
184 uint8_t teststr[] = { 0x53, 0x73, 0x12, 0x34, 't', 'o', 'k', in t_parse_pdu10() local
189 result = coap_pdu_parse((unsigned char *)teststr, sizeof(teststr), pdu); in t_parse_pdu10()
195 uint8_t teststr[] = { 0x60, 0x00, 0x12, 0x34 }; in t_parse_pdu11() local
198 result = coap_pdu_parse((unsigned char *)teststr, sizeof(teststr), pdu); in t_parse_pdu11()
201 CU_ASSERT(pdu->length == sizeof(teststr)); in t_parse_pdu11()
206 CU_ASSERT(memcmp(&pdu->hdr->id, teststr + 2, 2) == 0); in t_parse_pdu11()
212 uint8_t teststr[] = { 0x70, 0x00, 0x12, 0x34 }; in t_parse_pdu12() local
215 result = coap_pdu_parse((unsigned char *)teststr, sizeof(teststr), pdu); in t_parse_pdu12()
218 CU_ASSERT(pdu->length == sizeof(teststr)); in t_parse_pdu12()
223 CU_ASSERT(memcmp(&pdu->hdr->id, teststr + 2, 2) == 0); in t_parse_pdu12()
229 uint8_t teststr[] = { 0x70, 0x00, 0x12, 0x34, in t_parse_pdu13() local
234 result = coap_pdu_parse((unsigned char *)teststr, sizeof(teststr), pdu); in t_parse_pdu13()
241 uint8_t teststr[] = { 0x60, 0x00, 0x12, 0x34, in t_parse_pdu14() local
246 result = coap_pdu_parse((unsigned char *)teststr, sizeof(teststr), pdu); in t_parse_pdu14()
256 uint8_t teststr[] = { 0x45, 0x01, 0x12, 0x34, 't', 'o', 'k', 'e', 'n' }; in t_encode_pdu1() local
267 CU_ASSERT(pdu->length = sizeof(teststr)); in t_encode_pdu1()
269 CU_ASSERT(memcmp(pdu->hdr, teststr, sizeof(teststr)) == 0); in t_encode_pdu1()
302 uint8_t teststr[] = { 0x60, 0x99, 0x12, 0x34, 0x3d, 0x05, 0x66, 0x61, in t_encode_pdu4() local
349 CU_ASSERT(pdu->length == sizeof(teststr)); in t_encode_pdu4()
350 CU_ASSERT(memcmp(pdu->hdr, teststr, sizeof(teststr)) == 0); in t_encode_pdu4()
356 uint8_t teststr[] = { 0x68, 0x84, 0x12, 0x34, '1', '2', '3', '4', in t_encode_pdu5() local
390 CU_ASSERT(pdu->length == sizeof(teststr)); in t_encode_pdu5()
391 CU_ASSERT(memcmp(pdu->hdr, teststr, sizeof(teststr)) == 0); in t_encode_pdu5()
397 uint8_t teststr[] = { 0x50, 0x02, 0x12, 0x34, 0xff, '1', '2', '3', in t_encode_pdu6() local
411 CU_ASSERT(pdu->length == sizeof(teststr)); in t_encode_pdu6()
412 CU_ASSERT(memcmp(pdu->hdr, teststr, sizeof(teststr)) == 0); in t_encode_pdu6()
418 uint8_t teststr[] = { 0x40, 0x43, 0x12, 0x34 }; in t_encode_pdu7() local
434 CU_ASSERT(pdu->length == sizeof(teststr)); in t_encode_pdu7()
435 CU_ASSERT(memcmp(pdu->hdr, teststr, sizeof(teststr)) == 0); in t_encode_pdu7()
441 uint8_t teststr[] = { 0x42, 0x43, 0x12, 0x34, 0x00, 0x01, 0xff, 0x00 }; in t_encode_pdu8() local
461 CU_ASSERT(pdu->length == sizeof(teststr)); in t_encode_pdu8()
462 CU_ASSERT(memcmp(pdu->hdr, teststr, sizeof(teststr)) == 0); in t_encode_pdu8()
468 uint8_t teststr[] = { 0x60, 0x44, 0x12, 0x34, 0x48, 's', 'o', 'm', in t_encode_pdu9() local
512 CU_ASSERT(pdu->length == sizeof(teststr)); in t_encode_pdu9()
513 CU_ASSERT(memcmp(pdu->hdr, teststr, sizeof(teststr)) == 0); in t_encode_pdu9()
519 uint8_t teststr[] = { 0x62, 0x44, 0x12, 0x34, 0x00, 0x00, 0x8d, 0xf2, in t_encode_pdu10() local
599 CU_ASSERT(pdu->length == sizeof(teststr)); in t_encode_pdu10()
600 CU_ASSERT(memcmp(pdu->hdr, teststr, sizeof(teststr)) == 0); in t_encode_pdu10()