mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Unit Tests
- Corrected token types for '3rd', which is Lexer::Type::word, not LExer::Type::identifier.
This commit is contained in:
parent
309b607672
commit
565987a177
1 changed files with 5 additions and 5 deletions
|
@ -319,11 +319,11 @@ int main (int argc, char** argv)
|
||||||
tokens.push_back (std::pair <std::string, Lexer::Type> (token, type));
|
tokens.push_back (std::pair <std::string, Lexer::Type> (token, type));
|
||||||
}
|
}
|
||||||
|
|
||||||
t.is ((int)tokens.size (), 2, "2 tokens");
|
t.is ((int)tokens.size (), 2, "2 tokens");
|
||||||
t.is (tokens[0].first, "9th", "tokens[0] == '9th'");
|
t.is (tokens[0].first, "9th", "tokens[0] == '9th'");
|
||||||
t.is ((int) tokens[0].second, (int) Lexer::Type::identifier, "tokens[0] == Type::identifier");
|
t.is ((int) tokens[0].second, (int) Lexer::Type::word, "tokens[0] == Type::word");
|
||||||
t.is (tokens[1].first, "10th", "tokens[1] == '10th'");
|
t.is (tokens[1].first, "10th", "tokens[1] == '10th'");
|
||||||
t.is ((int) tokens[1].second, (int) Lexer::Type::identifier, "tokens[1] == Type::identifier");
|
t.is ((int) tokens[1].second, (int) Lexer::Type::word, "tokens[1] == Type::word");
|
||||||
|
|
||||||
// Test tag recognition.
|
// Test tag recognition.
|
||||||
Lexer l9 ("+with -WITHOUT + 2");
|
Lexer l9 ("+with -WITHOUT + 2");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue