Skip to content
Snippets Groups Projects
Commit 440ca336 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Added string test getLine.

parent 70b6f314
No related branches found
No related tags found
1 merge request!15Nina
...@@ -284,6 +284,23 @@ TEST( StringTest, SaveLoad ) ...@@ -284,6 +284,23 @@ TEST( StringTest, SaveLoad )
EXPECT_EQ( std::remove( "test-file.tnl" ), 0 ); 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 #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment