patrick
/
plasp
Archived
1
0
Fork 0

Extended Parser tests with whitespace handling check.

This commit is contained in:
Patrick Lühne 2016-05-30 12:56:30 +02:00
parent 4d984d32c3
commit 348bd98de8
1 changed files with 7 additions and 1 deletions

View File

@ -85,7 +85,7 @@ TEST(UtilsTests, ParseEndOfFile)
TEST(UtilsTests, ParserPosition)
{
std::stringstream s("123\n4\ntest1\n test2\ntest3 \n\n\n\n\n");
std::stringstream s("123 \n4\ntest1\n test2\ntest3 \n\n\n\n\n");
plasp::utils::Parser p(s);
ASSERT_EQ(p.row(), 1u);
@ -108,6 +108,12 @@ TEST(UtilsTests, ParserPosition)
ASSERT_EQ(p.row(), 1u);
ASSERT_EQ(p.column(), 4u);
ASSERT_EQ(p.currentCharacter(), ' ');
p.advance();
ASSERT_EQ(p.row(), 1u);
ASSERT_EQ(p.column(), 5u);
ASSERT_EQ(p.currentCharacter(), '\n');
p.advance();