From 440ca336261a32fab6c25240cf3c43a05a6dfc49 Mon Sep 17 00:00:00 2001
From: Tomas Oberhuber <tomas.oberhuber@fjfi.cvut.cz>
Date: Wed, 17 Oct 2018 15:17:21 +0200
Subject: [PATCH] Added string test getLine.

---
 src/UnitTests/StringTest.cpp | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/UnitTests/StringTest.cpp b/src/UnitTests/StringTest.cpp
index 6651455589..dcf500796d 100644
--- a/src/UnitTests/StringTest.cpp
+++ b/src/UnitTests/StringTest.cpp
@@ -284,6 +284,23 @@ TEST( StringTest, SaveLoad )
 
    EXPECT_EQ( std::remove( "test-file.tnl" ), 0 );
 };
+
+TEST( StringTest, getLine )
+{
+   std::stringstream str;
+   str << "Line 1" << std::endl;
+   str << "Line 2" << std::endl;
+   str.seekg( 0 );
+
+   String s;
+
+   s.getLine( str );
+   EXPECT_EQ( s, "Line 1" );
+
+   s.getLine( str );
+   EXPECT_EQ( s, "Line 2" );
+};
+
 #endif
 
 
-- 
GitLab