Go to the source code of this file.
|
| TEST (yEnc, EncodeDecode) |
|
◆ ydec_single
#define ydec_single |
( |
|
stringiter, |
|
|
|
ret |
|
) |
| |
Value:MACRO_BEGIN \
if (conv <= 0) { \
ret = -1; \
} else { \
if (conv == '=') { \
conv -= 64; \
} \
if (conv < 42) conv += 256; \
conv -= 42; \
ret = conv; \
} \
#define STRING_ITERATOR_GET(this)
Definition at line 31 of file yenc.qh.
Referenced by TEST().
◆ yenc_single
#define yenc_single |
( |
|
c, |
|
|
|
ret |
|
) |
| |
Value:MACRO_BEGIN \
int conv = c; \
conv += 42; \
if (conv >= 256) conv -= 256; \
switch (conv) \
{ \
default: \
{ \
ret = yenc_it; \
break; \
} \
case 0: \
case '\n': \
case '\r': \
case '=': \
{ \
conv += 64; \
string yenc_it =
chr2str(
'=', conv); \
ret = yenc_it; \
break; \
} \
} \
MACRO_END
Definition at line 5 of file yenc.qh.
Referenced by TEST().
◆ TEST()
TEST |
( |
yEnc |
, |
|
|
EncodeDecode |
|
|
) |
| |
Definition at line 47 of file yenc.qh.
References EXPECT_EQ, STRING_ITERATOR(), string_null, SUCCEED, ydec_single, and yenc_single.
49 for (
int i = 0; i <= 255; ++i)
#define yenc_single(c, ret)
#define EXPECT_EQ(expected_, actual_)
#define ydec_single(stringiter, ret)
#define SUCCEED()
Must be present at the end of a test.
STRING_ITERATOR(_json, string_null, 0)