1
0

単体テストの内容を増やし

This commit is contained in:
otya128
2015-06-03 19:58:07 +09:00
parent 35086e62db
commit a74268b59a

View File

@@ -58,6 +58,7 @@ unittest
auto token = lex.front();
assert(token.type == TokenType.Integer);
assert(token.value.integerValue == 1);
assert(lex.empty() == true);
}
{
auto lex = new Lexical("12345");
@@ -66,6 +67,21 @@ unittest
auto token = lex.front();
assert(token.type == TokenType.Integer);
assert(token.value.integerValue == 12345);
assert(lex.empty() == true);
}
{
auto lex = new Lexical("12345 67890");
assert(lex.empty() == false);
lex.popFront();
auto token = lex.front();
assert(token.type == TokenType.Integer);
assert(token.value.integerValue == 12345);
assert(lex.empty() == false);
lex.popFront();
token = lex.front();
assert(token.type == TokenType.Integer);
assert(token.value.integerValue == 67890);
assert(lex.empty() == true);
}
}
class Parser