From 843f7ce704019fca8656d539e9292cb399eb611f Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Thu, 3 Jul 2014 15:39:50 -0400 Subject: [PATCH] Unit Tests - Corrected Lexer test to use a supported duration. --- test/lexer.t.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/lexer.t.cpp b/test/lexer.t.cpp index 173cee5a7..d6c39a62b 100644 --- a/test/lexer.t.cpp +++ b/test/lexer.t.cpp @@ -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