Commit 5cf6fd99 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Fixed setSize method in String

parent e3cf68ad
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ inline int String::getAllocatedSize() const
inline void String::setSize( int size )
{
   TNL_ASSERT_GE( size, 0, "string size must be non-negative" );
   this->reserve( size );
   this->resize( size );
}

inline const char* String::getString() const
+1 −0
Original line number Diff line number Diff line
@@ -85,6 +85,7 @@ TEST( StringTest, SetSize )
{
   String str;
   str.setSize( 42 );
   EXPECT_EQ( str.getSize(), 42 );
   EXPECT_EQ( str.getAllocatedSize(), 42 );
}