#include <iostream>
#include <sstream>
#include "perf/perf.h"
#include "util/parsing.h"
Go to the source code of this file.
Functions | |
static void | testLine (IN const test_line_t *p) |
static void | invalidLine (IN const invalid_line_t *p) |
static void | doTest (void) |
int | main (IN int argc, IN const char *argv[]) |
Variables | |
static test_line_t | s_testLines [] |
static const invalid_line_t | s_invalidLines [] |
static void testLine | ( | IN const test_line_t * | p | ) | [static] |
Definition at line 94 of file utf8-parse-test.cpp.
static void invalidLine | ( | IN const invalid_line_t * | p | ) | [static] |
Definition at line 151 of file utf8-parse-test.cpp.
static void doTest | ( | void | ) | [static] |
Definition at line 174 of file utf8-parse-test.cpp.
int main | ( | IN int | argc, | |
IN const char * | argv[] | |||
) |
Definition at line 197 of file utf8-parse-test.cpp.
test_line_t s_testLines[] [static] |
{ { "This is a test in English", 6, 25 }, { "I can eat glass.", 4, 16 }, { "Мон ярсан суликадо, ды зыян эйстэнзэ а ули.", 8, 43 }, { "मैं काँच खा सकता हूँ और मुझे उससे कोई चोट नहीं पहुंचती", 12, 54 }, { "我能吞下玻璃而不傷身體", 1, 11 }, { "Я могу есть стекло, оно мне не вредит.", 8, 38 }, { "Je peux manger du verre, ça ne me fait pas mal.", 11, 48 }, { NULL, 0, 0 } }
Definition at line 27 of file utf8-parse-test.cpp.
const invalid_line_t s_invalidLines[] [static] |
{ { { 0x80, 0x00 } }, { { 0x81, 0x00 } }, { { 0xc0, 0x20, 0x00 } }, { { 0xc1, 0x30, 0x00 } }, { { 0xc1, 0x00 } }, { { 0xe0, 0x20, 0x00 } }, { { 0xe1, 0x00 } }, { { 0xe1, 0x20, 0x00 } }, { { 0xf0, 0x20, 0x00 } }, { { 0xf0, 0x00 } }, { { 0xfe, 0x00 } }, { { 0xff, 0x00 } }, { { 0xfe, 0xfe, 0xff, 0xff, 0x00 } }, { { 0x00 } } }
Definition at line 61 of file utf8-parse-test.cpp.