diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/t_scan_urlencoded_query.c | 9 | ||||
| -rw-r--r-- | tests/t_socket.c | 8 |
2 files changed, 0 insertions, 17 deletions
diff --git a/tests/t_scan_urlencoded_query.c b/tests/t_scan_urlencoded_query.c index 6fa34e0..f660ea3 100644 --- a/tests/t_scan_urlencoded_query.c +++ b/tests/t_scan_urlencoded_query.c | |||
| @@ -295,14 +295,6 @@ static void case_fmt_hex_is_lower_case(void) { | |||
| 295 | CHECK_STR(dest, "%00%ab%ff"); | 295 | CHECK_STR(dest, "%00%ab%ff"); |
| 296 | } | 296 | } |
| 297 | 297 | ||
| 298 | static void case_fmt_length_only(void) { | ||
| 299 | const uint8_t src[] = {'a', 0xff, 'b'}; | ||
| 300 | |||
| 301 | test_case("a null destination reports the length without writing"); | ||
| 302 | CHECK_INT(fmt_urlencoded(NULL, src, sizeof(src)), 5); | ||
| 303 | CHECK_INT(fmt_urlencoded(NULL, src, 0), 0); | ||
| 304 | } | ||
| 305 | |||
| 306 | static void case_fmt_zero_length(void) { | 298 | static void case_fmt_zero_length(void) { |
| 307 | char dest[4]; | 299 | char dest[4]; |
| 308 | 300 | ||
| @@ -374,7 +366,6 @@ void test_scan_urlencoded_query(void) { | |||
| 374 | case_fmt_passes_safe_bytes(); | 366 | case_fmt_passes_safe_bytes(); |
| 375 | case_fmt_escapes_the_rest(); | 367 | case_fmt_escapes_the_rest(); |
| 376 | case_fmt_hex_is_lower_case(); | 368 | case_fmt_hex_is_lower_case(); |
| 377 | case_fmt_length_only(); | ||
| 378 | case_fmt_zero_length(); | 369 | case_fmt_zero_length(); |
| 379 | case_fmt_worst_case_fits(); | 370 | case_fmt_worst_case_fits(); |
| 380 | case_fmt_decoder_disagrees_on_dollar(); | 371 | case_fmt_decoder_disagrees_on_dollar(); |
diff --git a/tests/t_socket.c b/tests/t_socket.c index cf7d291..bbc9e5e 100644 --- a/tests/t_socket.c +++ b/tests/t_socket.c | |||
| @@ -58,14 +58,6 @@ static void bound_address(int s, char ip[16], uint16_t *port) { | |||
| 58 | } | 58 | } |
| 59 | } | 59 | } |
| 60 | 60 | ||
| 61 | static uint16_t bound_port(int s) { | ||
| 62 | char ip[16]; | ||
| 63 | uint16_t port; | ||
| 64 | |||
| 65 | bound_address(s, ip, &port); | ||
| 66 | return port; | ||
| 67 | } | ||
| 68 | |||
| 69 | static int is_nonblocking(int s) { | 61 | static int is_nonblocking(int s) { |
| 70 | int flags = fcntl(s, F_GETFL, 0); | 62 | int flags = fcntl(s, F_GETFL, 0); |
| 71 | return flags != -1 && (flags & O_NONBLOCK) != 0; | 63 | return flags != -1 && (flags & O_NONBLOCK) != 0; |
