diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/nxt_utf8_test.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/test/nxt_utf8_test.c b/src/test/nxt_utf8_test.c index c7323876..5ca048ae 100644 --- a/src/test/nxt_utf8_test.c +++ b/src/test/nxt_utf8_test.c @@ -8,34 +8,34 @@ #include "nxt_tests.h" -#define NXT_UTF8_START_TEST 0xc2 +#define NXT_UTF8_START_TEST 0xC2 //#define NXT_UTF8_START_TEST 0 static u_char invalid[] = { - /* Invalid first byte less than 0xc2. */ + /* Invalid first byte less than 0xC2. */ 1, 0x80, 0x00, 0x00, 0x00, - 1, 0xc0, 0x00, 0x00, 0x00, - 2, 0xc0, 0x00, 0x00, 0x00, - 3, 0xc0, 0x00, 0x00, 0x00, - 4, 0xc0, 0x00, 0x00, 0x00, + 1, 0xC0, 0x00, 0x00, 0x00, + 2, 0xC0, 0x00, 0x00, 0x00, + 3, 0xC0, 0x00, 0x00, 0x00, + 4, 0xC0, 0x00, 0x00, 0x00, /* Invalid 0x0x110000 value. */ - 4, 0xf4, 0x90, 0x80, 0x80, + 4, 0xF4, 0x90, 0x80, 0x80, /* Incomplete length. */ - 2, 0xe0, 0xaf, 0xb5, 0x00, + 2, 0xE0, 0xAF, 0xB5, 0x00, /* Overlong values. */ - 2, 0xc0, 0x80, 0x00, 0x00, - 2, 0xc1, 0xb3, 0x00, 0x00, - 3, 0xe0, 0x80, 0x80, 0x00, - 3, 0xe0, 0x81, 0xb3, 0x00, - 3, 0xe0, 0x90, 0x9a, 0x00, - 4, 0xf0, 0x80, 0x8a, 0x80, - 4, 0xf0, 0x80, 0x81, 0xb3, - 4, 0xf0, 0x80, 0xaf, 0xb5, + 2, 0xC0, 0x80, 0x00, 0x00, + 2, 0xC1, 0xB3, 0x00, 0x00, + 3, 0xE0, 0x80, 0x80, 0x00, + 3, 0xE0, 0x81, 0xB3, 0x00, + 3, 0xE0, 0x90, 0x9A, 0x00, + 4, 0xF0, 0x80, 0x8A, 0x80, + 4, 0xF0, 0x80, 0x81, 0xB3, + 4, 0xF0, 0x80, 0xAF, 0xB5, }; @@ -54,7 +54,7 @@ nxt_utf8_overlong(nxt_thread_t *thr, u_char *overlong, size_t len) len = pp - overlong; - if (d != 0xffffffff) { + if (d != 0xFFFFFFFF) { p = nxt_utf8_encode(utf8, d); size = (p != NULL) ? p - utf8 : 0; @@ -128,7 +128,7 @@ nxt_utf8_test(nxt_thread_t *thr) d = nxt_utf8_decode(&pp, utf8 + len); - if (d != 0xffffffff) { + if (d != 0xFFFFFFFF) { u = 0; for (i = 0; i < len; i++) { |