diff --git a/test/lexer.t.cpp b/test/lexer.t.cpp index 108b86d02..173cee5a7 100644 --- a/test/lexer.t.cpp +++ b/test/lexer.t.cpp @@ -36,7 +36,7 @@ Context context; //////////////////////////////////////////////////////////////////////////////// int main (int argc, char** argv) { - UnitTest t (196); + UnitTest t (203); std::vector > tokens; std::string token; @@ -71,6 +71,15 @@ int main (int argc, char** argv) t.ok (Lexer::is_ws (0x205F), "U+205F is_ws"); t.ok (Lexer::is_ws (0x3000), "U+3000 is_ws"); + // static bool Lexer::boundary(int, int); + t.ok (Lexer::boundary (' ', 'a'), "' ' --> 'a' = boundary"); + t.ok (Lexer::boundary ('a', ' '), "'a' --> ' ' = boundary"); + t.ok (Lexer::boundary (' ', '+'), "' ' --> '+' = boundary"); + t.ok (Lexer::boundary (' ', ','), "' ' --> ',' = boundary"); + t.notok (Lexer::boundary ('3', '4'), "'3' --> '4' = boundary"); + t.ok (Lexer::boundary ('(', '('), "'(' --> '(' = boundary"); + t.notok (Lexer::boundary ('r', 'd'), "'r' --> 'd' = boundary"); + // Should result in no tokens. Lexer l0 (""); t.notok (l0.token (token, type), "'' --> no tokens");