• Home
  • Raw
  • Download

Lines Matching refs:teststr

25   coap_str_const_t teststr = {  1, (const uint8_t *)"" };  in t_parse_option1()  local
31 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option1()
41 coap_str_const_t teststr = { 2, (const uint8_t *)"\xc1" }; in t_parse_option2() local
46 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option2()
50 CU_ASSERT(option.value == teststr.s + 1); in t_parse_option2()
56 coap_str_const_t teststr = { 13, (const uint8_t *)"\x3c\x00\x01\x02\x03\x04" in t_parse_option3() local
62 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option3()
66 CU_ASSERT(option.value == teststr.s + 1); in t_parse_option3()
73 coap_str_const_t teststr = { 2, (const uint8_t *)"\xf3" }; in t_parse_option4() local
78 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option4()
85 coap_str_const_t teststr = { 2, (const uint8_t *)"\x3f" }; in t_parse_option5() local
90 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option5()
97 coap_str_const_t teststr = { 1, (const uint8_t *)"\xff" }; in t_parse_option6() local
102 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option6()
109 coap_str_const_t teststr = { 2, (const uint8_t *)"\xd0\x07" }; in t_parse_option7() local
114 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option7()
123 coap_str_const_t teststr = { 3, (const uint8_t *)"\xe0\x01\xff" }; in t_parse_option8() local
128 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option8()
137 coap_str_const_t teststr = { 3, (const uint8_t *)"\xe0\xfe\xf2" }; in t_parse_option9() local
142 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option9()
150 coap_str_const_t teststr = { 3, (const uint8_t *)"\xe0\xff\xff" }; in t_parse_option10() local
155 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option10()
162 coap_str_const_t teststr = { 1, (const uint8_t *)"\xd0" }; in t_parse_option11() local
167 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option11()
174 coap_str_const_t teststr = { 3, (const uint8_t *)"\xee\xff\x0b" }; in t_parse_option12() local
179 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option12()
187 coap_string_t teststr = { sizeof(_data), _data }; in t_parse_option13() local
188 teststr.s[0] = 0xee; in t_parse_option13()
189 teststr.s[1] = 0x00; in t_parse_option13()
190 teststr.s[2] = 0x0b; in t_parse_option13()
191 teststr.s[3] = 0x00; in t_parse_option13()
192 teststr.s[4] = 0xe7; in t_parse_option13()
197 result = coap_opt_parse(teststr.s, teststr.length, &option); in t_parse_option13()
238 char teststr[] = { 0x00 }; in t_encode_option1() local
243 CU_ASSERT(result == sizeof(teststr)); in t_encode_option1()
245 CU_ASSERT(memcmp(buf, teststr, result) == 0); in t_encode_option1()
250 uint8_t teststr[] = { 0x5d, 0xff }; in t_encode_option2() local
255 CU_ASSERT(result == sizeof(teststr)); in t_encode_option2()
257 CU_ASSERT(memcmp(buf, teststr, result) == 0); in t_encode_option2()
262 uint8_t teststr[] = { 0xd1, 0x01 }; in t_encode_option3() local
267 CU_ASSERT(result == sizeof(teststr)); in t_encode_option3()
269 CU_ASSERT(memcmp(buf, teststr, result) == 0); in t_encode_option3()
274 uint8_t teststr[] = { 0xdd, 0xff, 0xab }; in t_encode_option4() local
279 CU_ASSERT(result == sizeof(teststr)); in t_encode_option4()
281 CU_ASSERT(memcmp(buf, teststr, result) == 0); in t_encode_option4()
286 uint8_t teststr[] = { 0xed, 0x13, 0x00, 0xff }; in t_encode_option5() local
291 CU_ASSERT(result == sizeof(teststr)); in t_encode_option5()
293 CU_ASSERT(memcmp(buf, teststr, result) == 0); in t_encode_option5()
298 uint8_t teststr[] = { 0xee, 0xfe, 0xf2, 0xfe, 0xf2 }; in t_encode_option6() local
303 CU_ASSERT(result == sizeof(teststr)); in t_encode_option6()
305 CU_ASSERT(memcmp(buf, teststr, result) == 0); in t_encode_option6()
310 uint8_t teststr[] = { 0x35, 'v', 'a', 'l', 'u', 'e' }; in t_encode_option7() local
316 (unsigned char *)teststr + valoff, in t_encode_option7()
317 sizeof(teststr) - valoff); in t_encode_option7()
319 CU_ASSERT(result == sizeof(teststr)); in t_encode_option7()
321 CU_ASSERT(memcmp(buf, teststr, result) == 0); in t_encode_option7()
343 uint8_t teststr[] = { 0xe1, 0x00, 0x00 }; in t_encode_option9() local
348 CU_ASSERT(result == sizeof(teststr)); in t_encode_option9()
350 CU_ASSERT(memcmp(buf, teststr, result) == 0); in t_encode_option9()
359 const uint8_t teststr[] = { 0x12, 'a', 'b' }; in t_access_option1() local
362 CU_ASSERT(sizeof(teststr) == coap_opt_parse((const coap_opt_t *)teststr, in t_access_option1()
363 sizeof(teststr), &opt)); in t_access_option1()
365 CU_ASSERT(coap_opt_length((const coap_opt_t *)teststr) == 2); in t_access_option1()
366 CU_ASSERT_PTR_EQUAL_C(coap_opt_value((const coap_opt_t *)teststr), teststr + 1); in t_access_option1()
367 CU_ASSERT(coap_opt_size((const coap_opt_t *)teststr) == sizeof(teststr)); in t_access_option1()
372 const uint8_t teststr[] = { 0xe2, 0x18, 0xfd, 'a', 'b' }; in t_access_option2() local
375 CU_ASSERT(sizeof(teststr) == coap_opt_parse((const coap_opt_t *)teststr, in t_access_option2()
376 sizeof(teststr), &opt)); in t_access_option2()
378 CU_ASSERT(coap_opt_length((const coap_opt_t *)teststr) == 2); in t_access_option2()
379 CU_ASSERT_PTR_EQUAL_C(coap_opt_value((const coap_opt_t *)teststr), teststr + 3); in t_access_option2()
380 CU_ASSERT(coap_opt_size((const coap_opt_t *)teststr) == sizeof(teststr)); in t_access_option2()
385 const uint8_t teststr[] = { 0xed, 0x18, 0x0a, 0x00, 'a', 'b', 'c', 'd', in t_access_option3() local
391 CU_ASSERT(sizeof(teststr) == coap_opt_parse((const coap_opt_t *)teststr, in t_access_option3()
392 sizeof(teststr), &opt)); in t_access_option3()
394 CU_ASSERT(coap_opt_length((const coap_opt_t *)teststr) == 13); in t_access_option3()
395 CU_ASSERT_PTR_EQUAL_C(coap_opt_value((const coap_opt_t *)teststr), teststr + 4); in t_access_option3()
396 CU_ASSERT(coap_opt_size((const coap_opt_t *)teststr) == sizeof(teststr)); in t_access_option3()
401 const uint8_t teststr[] = { 0xde, 0xff, 0xfe, 0xf2, 'a', 'b', 'c' }; in t_access_option4() local
404 CU_ASSERT(0 == coap_opt_parse((const coap_opt_t *)teststr, in t_access_option4()
405 sizeof(teststr), &opt)); in t_access_option4()
407 CU_ASSERT(coap_opt_length((const coap_opt_t *)teststr) == 65535); in t_access_option4()
408 CU_ASSERT_PTR_EQUAL_C(coap_opt_value((const coap_opt_t *)teststr), teststr + 4); in t_access_option4()
409 CU_ASSERT(coap_opt_size((const coap_opt_t *)teststr) == 65535 + 4); in t_access_option4()
414 const uint8_t teststr[] = { 0xee, 0xfe, 0xf2, 0x00, 0xdd, 'a', 'b', 'c' }; in t_access_option5() local
417 CU_ASSERT(0 == coap_opt_parse((const coap_opt_t *)teststr, in t_access_option5()
418 sizeof(teststr), &opt)); in t_access_option5()
420 CU_ASSERT(coap_opt_length((const coap_opt_t *)teststr) == 490); in t_access_option5()
421 CU_ASSERT_PTR_EQUAL_C(coap_opt_value((const coap_opt_t *)teststr), teststr + 5); in t_access_option5()
422 CU_ASSERT(coap_opt_size((const coap_opt_t *)teststr) == 495); in t_access_option5()
428 const uint8_t teststr[] = { 0xf2, 'a', 'b' }; in t_access_option6() local
433 CU_ASSERT(0 == coap_opt_parse((const coap_opt_t *)teststr, in t_access_option6()
434 sizeof(teststr), &opt)); in t_access_option6()
436 CU_ASSERT(coap_opt_length((const coap_opt_t *)teststr) == 0); in t_access_option6()
437 CU_ASSERT_PTR_EQUAL_C(coap_opt_value((const coap_opt_t *)teststr), NULL); in t_access_option6()
438 CU_ASSERT(coap_opt_size((const coap_opt_t *)teststr) == 0); in t_access_option6()
443 const uint8_t teststr[] = { 0x2f, 'a', 'b' }; in t_access_option7() local
446 CU_ASSERT(0 == coap_opt_parse((const coap_opt_t *)teststr, in t_access_option7()
447 sizeof(teststr), &opt)); in t_access_option7()
449 CU_ASSERT(coap_opt_length((const coap_opt_t *)teststr) == 0); in t_access_option7()
450 CU_ASSERT_PTR_EQUAL_C(coap_opt_value((const coap_opt_t *)teststr), NULL); in t_access_option7()
451 CU_ASSERT(coap_opt_size((const coap_opt_t *)teststr) == 0); in t_access_option7()
469 uint8_t teststr[] ALIGNED(8) = { in t_iterate_option1() local
475 .token = teststr, in t_iterate_option1()
494 uint8_t teststr[3] ALIGNED(8) = { in t_iterate_option2() local
501 .token = teststr, in t_iterate_option2()
502 .used_size = sizeof(teststr) in t_iterate_option2()
520 uint8_t teststr[] ALIGNED(8) = { in t_iterate_option3() local
528 .token = teststr, in t_iterate_option3()
529 .used_size = sizeof(teststr) in t_iterate_option3()
542 CU_ASSERT_PTR_EQUAL(option, teststr + 3); in t_iterate_option3()
547 CU_ASSERT_PTR_EQUAL(option, teststr + 7); in t_iterate_option3()
552 CU_ASSERT_PTR_EQUAL(option, teststr + 8); in t_iterate_option3()
562 uint8_t teststr[] ALIGNED(8) = { in t_iterate_option4() local
571 .token = teststr, in t_iterate_option4()
572 .used_size = sizeof(teststr) in t_iterate_option4()
585 CU_ASSERT_PTR_EQUAL(option, teststr + 3); in t_iterate_option4()
590 CU_ASSERT_PTR_EQUAL(option, teststr + 7); in t_iterate_option4()
595 CU_ASSERT_PTR_EQUAL(option, teststr + 8); in t_iterate_option4()
605 uint8_t teststr[] ALIGNED(8) = { in t_iterate_option5() local
613 .token = teststr, in t_iterate_option5()
614 .used_size = sizeof(teststr) in t_iterate_option5()
627 CU_ASSERT_PTR_EQUAL(option, teststr); in t_iterate_option5()
638 uint8_t teststr[] ALIGNED(8) = { in t_iterate_option6() local
646 .token = teststr, in t_iterate_option6()
647 .used_size = sizeof(teststr) in t_iterate_option6()
663 CU_ASSERT_PTR_EQUAL(option, teststr + 1); in t_iterate_option6()
668 CU_ASSERT_PTR_EQUAL(option, teststr + 2); in t_iterate_option6()
673 CU_ASSERT_PTR_EQUAL(option, teststr + 3); in t_iterate_option6()
683 uint8_t teststr[] ALIGNED(8) = { in t_iterate_option7() local
691 .token = teststr, in t_iterate_option7()
692 .used_size = sizeof(teststr) in t_iterate_option7()
710 CU_ASSERT_PTR_EQUAL(option, teststr); in t_iterate_option7()
715 CU_ASSERT_PTR_EQUAL(option, teststr + 4); in t_iterate_option7()
720 CU_ASSERT_PTR_EQUAL(option, teststr + 5); in t_iterate_option7()
730 uint8_t teststr[] ALIGNED(8) = { in t_iterate_option8() local
738 .token = teststr, in t_iterate_option8()
739 .used_size = sizeof(teststr) in t_iterate_option8()
761 uint8_t teststr[] ALIGNED(8) = { in t_iterate_option9() local
769 .token = teststr, in t_iterate_option9()
770 .used_size = sizeof(teststr) in t_iterate_option9()
792 uint8_t teststr[] ALIGNED(8) = { in t_iterate_option10() local
800 .token = teststr, in t_iterate_option10()
801 .used_size = sizeof(teststr) in t_iterate_option10()
817 CU_ASSERT_PTR_EQUAL(option, teststr + 4); in t_iterate_option10()