diff --git a/tests/TestUtils.cpp b/tests/TestUtils.cpp index 7f5fbba..e95b92e 100644 --- a/tests/TestUtils.cpp +++ b/tests/TestUtils.cpp @@ -91,6 +91,8 @@ TEST(UtilsTests, ParserPosition) std::stringstream s("123 \n4\ntest1\n test2\ntest3 \ntest4\n\n\n\n"); plasp::utils::Parser p("input", s); + const auto startPosition = p.position(); + plasp::utils::Parser::Coordinate c; c = p.coordinate(); @@ -172,6 +174,10 @@ TEST(UtilsTests, ParserPosition) ASSERT_EQ(c.column, 1u); ASSERT_TRUE(p.atEndOfStream()); + p.reset(); + ASSERT_EQ(p.position(), startPosition); + ASSERT_FALSE(p.atEndOfStream()); + // TODO: test parser with multiple sections }