MCPcopy Create free account
hub / github.com/OISF/libhtp / TEST

Function TEST

test/test_utils.cpp:46–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44#include <htp/htp_private.h>
45
46TEST(Base64, Single) {
47 EXPECT_EQ(62, htp_base64_decode_single('+'));
48 EXPECT_EQ(63, htp_base64_decode_single('/'));
49 EXPECT_EQ(-1, htp_base64_decode_single(','));
50 EXPECT_EQ(-1, htp_base64_decode_single(0));
51 EXPECT_EQ(-1, htp_base64_decode_single('~'));
52 EXPECT_EQ(26, htp_base64_decode_single('a'));
53 EXPECT_EQ(0, htp_base64_decode_single('A'));
54}
55
56TEST(Base64, Decode) {
57 const char *input = "dGhpcyBpcyBhIHRlc3QuLg==";

Callers

nothing calls this directly

Calls 15

htp_base64_decode_singleFunction · 0.85
htp_base64_decode_memFunction · 0.85
bstr_cmp_cFunction · 0.85
bstr_freeFunction · 0.85
htp_is_separatorFunction · 0.85
htp_is_textFunction · 0.85
htp_is_tokenFunction · 0.85
htp_chompFunction · 0.85
htp_is_spaceFunction · 0.85
bstr_dup_cFunction · 0.85
htp_is_line_emptyFunction · 0.85

Tested by

no test coverage detected