2 * Copyright 2013, Axel Dörfler, axeld@pinc-software.de.
3 * Distributed under the terms of the MIT License.
14 assertEquals(const char* expected
, const char* result
)
16 if (strcmp(expected
, result
) != 0) {
17 printf("Expected \"%s\", got \"%s\"\n", expected
, result
);
26 const char* samples
[] = {
27 "Gelöscht", "Gel&APY-scht",
28 "&äöß", "&-&AOQA9gDf-"
31 IMAP::RFC3501Encoding encoding
;
33 for (size_t i
= 0; i
< sizeof(samples
) / sizeof(samples
[0]); i
+= 2) {
34 BString encoded
= encoding
.Encode(samples
[i
]);
35 assertEquals(samples
[i
+ 1], encoded
);
36 BString decoded
= encoding
.Decode(encoded
);
37 assertEquals(samples
[i
], decoded
);