Test the text_util.h interfaces.
More...
#include <mock_bpa/text_util.h>
#include <unity.h>
#include <string.h>
|
| void | test_mock_bpa_uri_percent_encode_valid (const char *text, const char *safe, const char *expect) |
| |
| void | test_mock_bpa_uri_percent_decode_valid (const char *text, const char *expect) |
| |
| void | test_mock_bpa_uri_percent_decode_invalid (const char *text) |
| |
| void | test_mock_bpa_slash_escape_valid (const char *text, const char quote, const char *expect) |
| |
| void | test_mock_bpa_slash_unescape_valid (const char *text, const char *expect) |
| |
| void | test_mock_bpa_slash_unescape_invalid (const char *text) |
| |
| void | test_mock_bpa_base16_encode (const char *data, size_t data_len, bool uppercase, const char *expect) |
| |
| void | test_mock_bpa_base16_decode_valid (const char *text, const char *expect, size_t expect_len) |
| |
| void | test_mock_bpa_base16_decode_invalid (const char *text) |
| |
| | TEST_CASE ("\xc1\x04\xc4\xcf\xb7\x77\x0f\xf0\xbe\xba\xa2\xe9\x5f\xbc\x2c\x18", 16, false, true) |
| |
| void | test_mock_bpa_base64_decode_valid (const char *text, const char *expect, size_t expect_len) |
| |
| void | test_mock_bpa_base64_decode_invalid (const char *text) |
| |
Test the text_util.h interfaces.
◆ TEST_CASE
◆ TEST_CASE()
| TEST_CASE |
( |
"\xc1\x04\xc4\xcf\xb7\x77\x0f\xf0\xbe\xba\xa2\xe9\x5f\xbc\x2c\x18" |
, |
|
|
|
16, |
|
|
|
false, |
|
|
|
true |
|
) |
| |
◆ test_mock_bpa_base16_decode_invalid()
| void test_mock_bpa_base16_decode_invalid |
( |
const char * |
text | ) |
|
◆ test_mock_bpa_base16_decode_valid()
| void test_mock_bpa_base16_decode_valid |
( |
const char * |
text, |
|
|
const char * |
expect, |
|
|
size_t |
expect_len |
|
) |
| |
◆ test_mock_bpa_base16_encode()
| void test_mock_bpa_base16_encode |
( |
const char * |
data, |
|
|
size_t |
data_len, |
|
|
bool |
uppercase, |
|
|
const char * |
expect |
|
) |
| |
◆ test_mock_bpa_base64_decode_invalid()
| void test_mock_bpa_base64_decode_invalid |
( |
const char * |
text | ) |
|
◆ test_mock_bpa_base64_decode_valid()
| void test_mock_bpa_base64_decode_valid |
( |
const char * |
text, |
|
|
const char * |
expect, |
|
|
size_t |
expect_len |
|
) |
| |
◆ test_mock_bpa_slash_escape_valid()
| void test_mock_bpa_slash_escape_valid |
( |
const char * |
text, |
|
|
const char |
quote, |
|
|
const char * |
expect |
|
) |
| |
◆ test_mock_bpa_slash_unescape_invalid()
| void test_mock_bpa_slash_unescape_invalid |
( |
const char * |
text | ) |
|
◆ test_mock_bpa_slash_unescape_valid()
| void test_mock_bpa_slash_unescape_valid |
( |
const char * |
text, |
|
|
const char * |
expect |
|
) |
| |
◆ test_mock_bpa_uri_percent_decode_invalid()
| void test_mock_bpa_uri_percent_decode_invalid |
( |
const char * |
text | ) |
|
◆ test_mock_bpa_uri_percent_decode_valid()
| void test_mock_bpa_uri_percent_decode_valid |
( |
const char * |
text, |
|
|
const char * |
expect |
|
) |
| |
◆ test_mock_bpa_uri_percent_encode_valid()
| void test_mock_bpa_uri_percent_encode_valid |
( |
const char * |
text, |
|
|
const char * |
safe, |
|
|
const char * |
expect |
|
) |
| |