diff options
| author | jakob <jakob@memeware.net> | 2017-08-01 14:38:08 -0400 |
|---|---|---|
| committer | jakob <jakob@memeware.net> | 2017-08-01 14:38:08 -0400 |
| commit | c111a7c7b1c1761b6164e3d6e9936e894d8de2e3 (patch) | |
| tree | 2894f7c94935640062a58813977c5072f590d86e /test/test_encoding.c | |
| parent | f1a78a551cabe3ce95e076defc03ab41cfa825b6 (diff) | |
Improved test suite
Diffstat (limited to 'test/test_encoding.c')
| -rw-r--r-- | test/test_encoding.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/test/test_encoding.c b/test/test_encoding.c index bd63426..a19f68f 100644 --- a/test/test_encoding.c +++ b/test/test_encoding.c @@ -20,26 +20,27 @@ #include <stdlib.h> #include <string.h> -#include "minunit.h" - #include "encoding.h" +#include "minunit.h" + -char *test_decode_utf16le(void) { +const char *test_decode_utf16le(void) { char *in = "\x41\x00\x42\x00\x43\x00\x00\x00", *out = malloc(8); memset(out, '\xff', 8); utf16le_decode(in, out, 8); - mu_assert("UTF16-LE decoding failure", !strcmp(out, "ABC")); + mu_assert("[encoding] test_decode_utf16le: UTF16-LE decoding failure", + !strcmp(out, "ABC")); free(out); return NULL; } -char *test_encode_utf16le(void) { +const char *test_encode_utf16le(void) { char *in = "ABC", *out = malloc(8); memset(out, '\xff', 8); utf16le_encode(in, out, 3); - mu_assert("UTF16-LE encoding failure", + mu_assert("[encoding] test_encode_utf16le: UTF16-LE encoding failure", !memcmp(out, "\x41\x00\x42\x00\x43\x00\x00\x00", 8)); free(out); return NULL; |