mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Unit Tests
- Corrected Lexer test to use a supported duration.
This commit is contained in:
parent
a3cfc2de7f
commit
843f7ce704
1 changed files with 2 additions and 2 deletions
|
@ -214,7 +214,7 @@ int main (int argc, char** argv)
|
|||
t.is (tokens[9].second, Lexer::typeDate, "tokens[9] == typeDate");
|
||||
|
||||
// Test for durations
|
||||
Lexer l5 ("second 1minute 2hour 3 days 4w 5mo 6 years");
|
||||
Lexer l5 ("1second 1minute 2hour 3 days 4w 5mo 6 years");
|
||||
tokens.clear ();
|
||||
while (l5.token (token, type))
|
||||
{
|
||||
|
@ -223,7 +223,7 @@ int main (int argc, char** argv)
|
|||
}
|
||||
|
||||
t.is ((int)tokens.size (), 7, "7 tokens");
|
||||
t.is (tokens[0].first, "second", "tokens[0] == 'second'");
|
||||
t.is (tokens[0].first, "1second", "tokens[0] == '1second'");
|
||||
t.is (tokens[0].second, Lexer::typeDuration, "tokens[0] == typeDuration");
|
||||
t.is (tokens[1].first, "1minute", "tokens[1] == '1minute'");
|
||||
t.is (tokens[1].second, Lexer::typeDuration, "tokens[1] == typeDuration"); // 110
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue