diff -r d575fd691cf9 -r afe194b6b1cd searchengine/util/tsrc/cpixtoolsunittest/src/parseunittest.cpp --- a/searchengine/util/tsrc/cpixtoolsunittest/src/parseunittest.cpp Wed Jun 23 19:26:19 2010 +0300 +++ b/searchengine/util/tsrc/cpixtoolsunittest/src/parseunittest.cpp Tue Jul 06 15:30:04 2010 +0300 @@ -24,49 +24,28 @@ using namespace Cpt::Parser; using namespace std; -enum TokenType { - TOKEN_LEFT_BRACKET = Cpt::Lex::TOKEN_LAST_RESERVED, // 8 - TOKEN_RIGHT_BRACKET, - TOKEN_COMMA, // 10 - TOKEN_PIPE, - TOKEN_SWITCH, - TOKEN_CASE, - TOKEN_DEFAULT, - TOKEN_LEFT_BRACE, // 15 - TOKEN_RIGHT_BRACE, - TOKEN_COLON, - TOKEN_TERMINATOR -}; +const wchar_t* TOKEN_LEFT_BRACKET = L"left bracket"; +const wchar_t* TOKEN_RIGHT_BRACKET = L"right bracket"; +const wchar_t* TOKEN_COMMA = L"comma"; +const wchar_t* TOKEN_PIPE = L"pipe"; +const wchar_t* TOKEN_SWITCH = L"switch"; +const wchar_t* TOKEN_CASE = L"case"; +const wchar_t* TOKEN_DEFAULT = L"default"; +const wchar_t* TOKEN_LEFT_BRACE = L"left brace"; +const wchar_t* TOKEN_RIGHT_BRACE = L"right brace"; +const wchar_t* TOKEN_COLON = L"colon"; +const wchar_t* TOKEN_TERMINATOR = L"terminator"; void PrintToken(Cpt::Lex::Token token) { - switch (token.type()) { - case TOKEN_WS: wcout<add("tokenization1", TestTokenization1, "tokenization1"); @@ -223,11 +291,19 @@ parsingTests->add("tokenization5", TestTokenization5, "tokenization5"); + + parsingTests->add("tokenization6", + TestTokenization6, + "tokenization6"); parsingTests->add("syntaxerrors", TestTokenizationErrors, "syntaxerrors"); - + + parsingTests->add("whitespace", + TestWhitespaceSplitter, + "whitespace"); + return parsingTests; }