Lines Matching refs:response
34 coap_pdu_t *response; in t_error_response1() local
42 response = coap_new_error_response(pdu, COAP_RESPONSE_CODE(400), opts); in t_error_response1()
44 CU_ASSERT_PTR_NOT_NULL(response); in t_error_response1()
46 CU_ASSERT(response->length == sizeof(teststr)); in t_error_response1()
47 CU_ASSERT(response->hdr->version == 1); in t_error_response1()
48 CU_ASSERT(response->hdr->type == COAP_MESSAGE_ACK); in t_error_response1()
49 CU_ASSERT(response->hdr->token_length == 0); in t_error_response1()
50 CU_ASSERT(response->hdr->code == 0x80); in t_error_response1()
53 CU_ASSERT(memcmp(response->hdr, teststr, sizeof(teststr)) == 0); in t_error_response1()
63 coap_pdu_t *response; in t_error_response2() local
72 response = coap_new_error_response(pdu, COAP_RESPONSE_CODE(404), opts); in t_error_response2()
74 CU_ASSERT_PTR_NOT_NULL(response); in t_error_response2()
76 CU_ASSERT(response->length == sizeof(teststr)); in t_error_response2()
77 CU_ASSERT(response->hdr->version == 1); in t_error_response2()
78 CU_ASSERT(response->hdr->type == COAP_MESSAGE_NON); in t_error_response2()
79 CU_ASSERT(response->hdr->token_length == 5); in t_error_response2()
80 CU_ASSERT(response->hdr->code == 0x84); in t_error_response2()
82 CU_ASSERT(memcmp(response->hdr, teststr, sizeof(teststr)) == 0); in t_error_response2()
93 coap_pdu_t *response; in t_error_response3() local
105 response = coap_new_error_response(pdu, code, opts); in t_error_response3()
107 CU_ASSERT_PTR_NOT_NULL(response); in t_error_response3()
109 CU_ASSERT(response->length == sizeof(teststr)); in t_error_response3()
110 CU_ASSERT(response->hdr->version == 1); in t_error_response3()
111 CU_ASSERT(response->hdr->type == COAP_MESSAGE_ACK); in t_error_response3()
112 CU_ASSERT(response->hdr->token_length == 5); in t_error_response3()
113 CU_ASSERT(response->hdr->code == code); in t_error_response3()
115 CU_ASSERT(memcmp(response->hdr, teststr, sizeof(teststr)) == 0); in t_error_response3()
132 coap_pdu_t *response; in t_error_response4() local
144 response = coap_new_error_response(pdu, code, opts); in t_error_response4()
146 CU_ASSERT_PTR_NOT_NULL(response); in t_error_response4()
148 CU_ASSERT(response->length == sizeof(teststr)); in t_error_response4()
149 CU_ASSERT(response->hdr->version == 1); in t_error_response4()
150 CU_ASSERT(response->hdr->type == COAP_MESSAGE_ACK); in t_error_response4()
151 CU_ASSERT(response->hdr->token_length == 5); in t_error_response4()
152 CU_ASSERT(response->hdr->code == code); in t_error_response4()
154 CU_ASSERT(memcmp(response->hdr, teststr, sizeof(teststr)) == 0); in t_error_response4()
173 coap_pdu_t *response; in t_error_response5() local
185 response = coap_new_error_response(pdu, code, opts); in t_error_response5()
187 CU_ASSERT_PTR_NOT_NULL(response); in t_error_response5()
189 CU_ASSERT(response->length == sizeof(teststr)); in t_error_response5()
190 CU_ASSERT(response->hdr->version == 1); in t_error_response5()
191 CU_ASSERT(response->hdr->type == COAP_MESSAGE_ACK); in t_error_response5()
192 CU_ASSERT(response->hdr->token_length == 5); in t_error_response5()
193 CU_ASSERT(response->hdr->code == code); in t_error_response5()
195 CU_ASSERT(memcmp(response->hdr, teststr, sizeof(teststr)) == 0); in t_error_response5()
214 coap_pdu_t *response; in t_error_response6() local
226 response = coap_new_error_response(pdu, code, opts); in t_error_response6()
228 CU_ASSERT_PTR_NOT_NULL(response); in t_error_response6()
230 CU_ASSERT(response->length == sizeof(teststr)); in t_error_response6()
231 CU_ASSERT(response->hdr->version == 1); in t_error_response6()
232 CU_ASSERT(response->hdr->type == COAP_MESSAGE_ACK); in t_error_response6()
233 CU_ASSERT(response->hdr->token_length == 5); in t_error_response6()
234 CU_ASSERT(response->hdr->code == code); in t_error_response6()
236 CU_ASSERT(memcmp(response->hdr, teststr, sizeof(teststr)) == 0); in t_error_response6()
255 coap_pdu_t *response; in t_error_response7() local
268 response = coap_new_error_response(pdu, code, opts); in t_error_response7()
270 CU_ASSERT_PTR_NOT_NULL(response); in t_error_response7()
272 CU_ASSERT(response->length == sizeof(teststr)); in t_error_response7()
273 CU_ASSERT(response->hdr->version == 1); in t_error_response7()
274 CU_ASSERT(response->hdr->type == COAP_MESSAGE_ACK); in t_error_response7()
275 CU_ASSERT(response->hdr->token_length == 5); in t_error_response7()
276 CU_ASSERT(response->hdr->code == code); in t_error_response7()
278 CU_ASSERT(memcmp(response->hdr, teststr, sizeof(teststr)) == 0); in t_error_response7()
291 coap_pdu_t *response; in t_error_response8() local
309 response = coap_new_error_response(pdu, code, opts); in t_error_response8()
311 CU_ASSERT_PTR_NOT_NULL(response); in t_error_response8()
313 CU_ASSERT(response->length == sizeof(teststr)); in t_error_response8()
314 CU_ASSERT(response->hdr->version == 1); in t_error_response8()
315 CU_ASSERT(response->hdr->type == COAP_MESSAGE_ACK); in t_error_response8()
316 CU_ASSERT(response->hdr->token_length == 5); in t_error_response8()
317 CU_ASSERT(response->hdr->code == code); in t_error_response8()
319 CU_ASSERT(memcmp(response->hdr, teststr, sizeof(teststr)) == 0); in t_error_response8()