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

Added FileNameTest.

parent 67b1142b
No related branches found
No related tags found
1 merge request!15Nina
......@@ -31,17 +31,17 @@ else()
tnl )
endif()
ADD_EXECUTABLE( FileNameTest FileNameTest.cpp )
TARGET_COMPILE_OPTIONS( FileNameTest PRIVATE ${CXX_TESTS_FLAGS} )
TARGET_LINK_LIBRARIES( FileNameTest ${GTEST_BOTH_LIBRARIES} tnl )
ADD_EXECUTABLE( StringTest StringTest.cpp )
TARGET_COMPILE_OPTIONS( StringTest PRIVATE ${CXX_TESTS_FLAGS} )
TARGET_LINK_LIBRARIES( StringTest
${GTEST_BOTH_LIBRARIES}
tnl )
TARGET_LINK_LIBRARIES( StringTest ${GTEST_BOTH_LIBRARIES} tnl )
ADD_EXECUTABLE( ObjectTest ObjectTest.cpp )
TARGET_COMPILE_OPTIONS( ObjectTest PRIVATE ${CXX_TESTS_FLAGS} )
TARGET_LINK_LIBRARIES( ObjectTest
${GTEST_BOTH_LIBRARIES}
tnl )
TARGET_LINK_LIBRARIES( ObjectTest ${GTEST_BOTH_LIBRARIES} tnl )
ADD_EXECUTABLE( SaveAndLoadMeshfunctionTest SaveAndLoadMeshfunctionTest.cpp )
TARGET_COMPILE_OPTIONS( SaveAndLoadMeshfunctionTest PRIVATE ${CXX_TESTS_FLAGS} )
......
/***************************************************************************
FileNameTest.cpp - description
-------------------
begin : Oct 17, 2018
copyright : (C) 2018 by Tomas Oberhuber
email : tomas.oberhuber@fjfi.cvut.cz
***************************************************************************/
/* See Copyright Notice in tnl/Copyright */
// Implemented by Nina Dzugasova
#ifdef HAVE_GTEST
#include <gtest/gtest.h>
#endif
#include <TNL/FileName.h>
using namespace TNL;
#ifdef HAVE_GTEST
TEST( FileNameTest, Constructor )
{
/*String str1( "string1" );
String str2( "xxxstring2", 3 );
String str3( "string3xxx", 0, 3 );
String str4( "xxxstring4xxx", 3, 3 );
EXPECT_EQ( strcmp( str1.getString(), "string1" ), 0 );
EXPECT_EQ( strcmp( str2.getString(), "string2" ), 0 );
EXPECT_EQ( strcmp( str3.getString(), "string3" ), 0 );
EXPECT_EQ( strcmp( str4.getString(), "string4" ), 0 );*/
}
#endif
#include "GtestMissingError.h"
int main( int argc, char* argv[] )
{
#ifdef HAVE_GTEST
::testing::InitGoogleTest( &argc, argv );
return RUN_ALL_TESTS();
#else
throw GtestMissingError();
#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