Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
574c256c
There was an error fetching the commit references. Please try again later.
Commit
574c256c
authored
6 years ago
by
Tomáš Oberhuber
Browse files
Options
Downloads
Patches
Plain Diff
Added FileNameTest.
parent
67b1142b
No related branches found
No related tags found
1 merge request
!15
Nina
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/UnitTests/CMakeLists.txt
+6
-6
6 additions, 6 deletions
src/UnitTests/CMakeLists.txt
src/UnitTests/FileNameTest.cpp
+47
-0
47 additions, 0 deletions
src/UnitTests/FileNameTest.cpp
with
53 additions
and
6 deletions
src/UnitTests/CMakeLists.txt
+
6
−
6
View file @
574c256c
...
...
@@ -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
}
)
...
...
This diff is collapsed.
Click to expand it.
src/UnitTests/FileNameTest.cpp
0 → 100644
+
47
−
0
View file @
574c256c
/***************************************************************************
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
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment