5 #define yenc_single(c, ret) \
9 if (conv >= 256) conv -= 256; \
14 string yenc_it = chr2str(conv); \
24 string yenc_it = chr2str('=', conv); \
31 #define ydec_single(stringiter, ret) \
33 int conv = STRING_ITERATOR_GET(stringiter); \
38 conv = STRING_ITERATOR_GET(stringiter); \
41 if (conv < 42) conv += 256; \
47 TEST(yEnc, EncodeDecode)
49 for (int i = 0; i <= 255; ++i)
53 string fragment = string_null;
54 yenc_single(expect, fragment);
57 STRING_ITERATOR(fragmentiterator, fragment, 0);
58 ydec_single(fragmentiterator, encdec);
60 EXPECT_EQ(expect, encdec);