-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nanocoap: rename coap_get_code() -> coap_get_code_decimal() #20004
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -89,7 +89,7 @@ static void test_gcoap__client_get_req(void) | |||||
len = gcoap_request(&pdu, &buf[0], CONFIG_GCOAP_PDU_BUF_SIZE, | ||||||
COAP_METHOD_GET, &path[0]); | ||||||
|
||||||
TEST_ASSERT_EQUAL_INT(COAP_METHOD_GET, coap_get_code(&pdu)); | ||||||
TEST_ASSERT_EQUAL_INT(COAP_METHOD_GET, coap_get_code_decimal(&pdu)); | ||||||
TEST_ASSERT_EQUAL_INT(CONFIG_GCOAP_TOKENLEN, coap_get_token_len(&pdu)); | ||||||
TEST_ASSERT_EQUAL_INT(hdr_fixed_len + CONFIG_GCOAP_TOKENLEN, | ||||||
coap_get_total_hdr_len(&pdu)); | ||||||
|
@@ -157,7 +157,7 @@ static void test_gcoap__client_put_req(void) | |||||
|
||||||
coap_parse(&pdu, buf, len + 1); | ||||||
|
||||||
TEST_ASSERT_EQUAL_INT(COAP_METHOD_PUT, coap_get_code(&pdu)); | ||||||
TEST_ASSERT_EQUAL_INT(COAP_METHOD_PUT, coap_get_code_decimal(&pdu)); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
TEST_ASSERT_EQUAL_INT(1, pdu.payload_len); | ||||||
TEST_ASSERT_EQUAL_INT('1', (char)*pdu.payload); | ||||||
} | ||||||
|
@@ -223,7 +223,7 @@ static void test_gcoap__client_ping(void) | |||||
NULL); | ||||||
|
||||||
TEST_ASSERT_EQUAL_INT(0, res); | ||||||
TEST_ASSERT_EQUAL_INT(COAP_CODE_EMPTY, coap_get_code(&pdu)); | ||||||
TEST_ASSERT_EQUAL_INT(COAP_CODE_EMPTY, coap_get_code_decimal(&pdu)); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
TEST_ASSERT_EQUAL_INT(COAP_TYPE_CON, coap_get_type(&pdu)); | ||||||
TEST_ASSERT_EQUAL_INT(0, coap_get_token_len(&pdu)); | ||||||
|
||||||
|
@@ -261,7 +261,7 @@ static void test_gcoap__server_get_req(void) | |||||
int res = _read_cli_stats_req(&pdu, &buf[0]); | ||||||
|
||||||
TEST_ASSERT_EQUAL_INT(0, res); | ||||||
TEST_ASSERT_EQUAL_INT(COAP_METHOD_GET, coap_get_code(&pdu)); | ||||||
TEST_ASSERT_EQUAL_INT(COAP_METHOD_GET, coap_get_code_decimal(&pdu)); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
TEST_ASSERT_EQUAL_INT(2, coap_get_token_len(&pdu)); | ||||||
TEST_ASSERT_EQUAL_INT(4 + 2, coap_get_total_hdr_len(&pdu)); | ||||||
TEST_ASSERT_EQUAL_INT(COAP_TYPE_NON, coap_get_type(&pdu)); | ||||||
|
@@ -333,7 +333,7 @@ static void test_gcoap__server_con_req(void) | |||||
int res = _read_cli_stats_req_con(&pdu, &buf[0]); | ||||||
|
||||||
TEST_ASSERT_EQUAL_INT(0, res); | ||||||
TEST_ASSERT_EQUAL_INT(COAP_METHOD_GET, coap_get_code(&pdu)); | ||||||
TEST_ASSERT_EQUAL_INT(COAP_METHOD_GET, coap_get_code_decimal(&pdu)); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
TEST_ASSERT_EQUAL_INT(COAP_TYPE_CON, coap_get_type(&pdu)); | ||||||
} | ||||||
|
||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -108,7 +108,7 @@ static void test_nanocoap__get_req(void) | |||||
|
||||||
coap_pkt_init(&pkt, &buf[0], sizeof(buf), len); | ||||||
|
||||||
TEST_ASSERT_EQUAL_INT(COAP_METHOD_GET, coap_get_code(&pkt)); | ||||||
TEST_ASSERT_EQUAL_INT(COAP_METHOD_GET, coap_get_code_decimal(&pkt)); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
TEST_ASSERT_EQUAL_INT(2, coap_get_token_len(&pkt)); | ||||||
TEST_ASSERT_EQUAL_INT(total_hdr_len, coap_get_total_hdr_len(&pkt)); | ||||||
TEST_ASSERT_EQUAL_INT(COAP_TYPE_NON, coap_get_type(&pkt)); | ||||||
|
@@ -146,7 +146,7 @@ static void test_nanocoap__put_req(void) | |||||
|
||||||
coap_pkt_init(&pkt, &buf[0], sizeof(buf), len); | ||||||
|
||||||
TEST_ASSERT_EQUAL_INT(COAP_METHOD_PUT, coap_get_code(&pkt)); | ||||||
TEST_ASSERT_EQUAL_INT(COAP_METHOD_PUT, coap_get_code_decimal(&pkt)); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
TEST_ASSERT_EQUAL_INT(122, pkt.payload_len); | ||||||
|
||||||
len = coap_opt_add_string(&pkt, COAP_OPT_URI_PATH, &path[0], '/'); | ||||||
|
@@ -683,7 +683,7 @@ static void test_nanocoap__server_get_req(void) | |||||
int res = _read_riot_value_req(&pkt, &buf[0]); | ||||||
|
||||||
TEST_ASSERT_EQUAL_INT(0, res); | ||||||
TEST_ASSERT_EQUAL_INT(COAP_METHOD_GET, coap_get_code(&pkt)); | ||||||
TEST_ASSERT_EQUAL_INT(COAP_METHOD_GET, coap_get_code_decimal(&pkt)); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
TEST_ASSERT_EQUAL_INT(2, coap_get_token_len(&pkt)); | ||||||
TEST_ASSERT_EQUAL_INT(4 + 2, coap_get_total_hdr_len(&pkt)); | ||||||
TEST_ASSERT_EQUAL_INT(COAP_TYPE_NON, coap_get_type(&pkt)); | ||||||
|
@@ -740,7 +740,7 @@ static void test_nanocoap__server_get_req_con(void) | |||||
int res = _read_riot_value_req_con(&pkt, &buf[0]); | ||||||
|
||||||
TEST_ASSERT_EQUAL_INT(0, res); | ||||||
TEST_ASSERT_EQUAL_INT(COAP_METHOD_GET, coap_get_code(&pkt)); | ||||||
TEST_ASSERT_EQUAL_INT(COAP_METHOD_GET, coap_get_code_decimal(&pkt)); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
TEST_ASSERT_EQUAL_INT(COAP_TYPE_CON, coap_get_type(&pkt)); | ||||||
} | ||||||
|
||||||
|
@@ -1081,7 +1081,7 @@ static void test_nanocoap__token_length_ext_16(void) | |||||
int res = coap_parse(&pkt, buf, 21); | ||||||
|
||||||
TEST_ASSERT_EQUAL_INT(0, res); | ||||||
TEST_ASSERT_EQUAL_INT(204, coap_get_code(&pkt)); | ||||||
TEST_ASSERT_EQUAL_INT(204, coap_get_code_decimal(&pkt)); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
TEST_ASSERT_EQUAL_INT(23, coap_get_id(&pkt)); | ||||||
TEST_ASSERT_EQUAL_INT(strlen(token), coap_get_token_len(&pkt)); | ||||||
TEST_ASSERT_EQUAL_INT(0, memcmp(coap_get_token(&pkt), token, strlen(token))); | ||||||
|
@@ -1109,7 +1109,7 @@ static void test_nanocoap__token_length_ext_269(void) | |||||
int res = coap_parse(&pkt, buf, 275); | ||||||
|
||||||
TEST_ASSERT_EQUAL_INT(0, res); | ||||||
TEST_ASSERT_EQUAL_INT(204, coap_get_code(&pkt)); | ||||||
TEST_ASSERT_EQUAL_INT(204, coap_get_code_decimal(&pkt)); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
TEST_ASSERT_EQUAL_INT(23, coap_get_id(&pkt)); | ||||||
TEST_ASSERT_EQUAL_INT(strlen(token), coap_get_token_len(&pkt)); | ||||||
TEST_ASSERT_EQUAL_INT(0, memcmp(coap_get_token(&pkt), token, strlen(token))); | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.