Skip to content
Snippets Groups Projects
Commit 779a1d1e authored by Tomáš Jakubec's avatar Tomáš Jakubec
Browse files

add fail test

parent 258950a9
No related branches found
No related tags found
No related merge requests found
......@@ -5,6 +5,10 @@ ADD_EXECUTABLE( DummyTest DummyTest.cpp )
TARGET_COMPILE_OPTIONS( DummyTest PRIVATE ${CXX_TESTS_FLAGS} )
TARGET_LINK_LIBRARIES( DummyTest ${GTEST_BOTH_LIBRARIES} )
ADD_EXECUTABLE( DummyTestFail DummyTestFail.cpp )
TARGET_COMPILE_OPTIONS( DummyTestFail PRIVATE ${CXX_TESTS_FLAGS} )
TARGET_LINK_LIBRARIES( DummyTestFail ${GTEST_BOTH_LIBRARIES} )
# Specify a cuda test
# if( BUILD_CUDA )
......@@ -17,6 +21,7 @@ TARGET_LINK_LIBRARIES( DummyTest ${GTEST_BOTH_LIBRARIES} )
# endif()
ADD_TEST( DummyTest ${EXECUTABLE_OUTPUT_PATH}/DummyTest${CMAKE_EXECUTABLE_SUFFIX} )
ADD_TEST( DummyTestFail ${EXECUTABLE_OUTPUT_PATH}/DummyTestFail${CMAKE_EXECUTABLE_SUFFIX} )
# Add the tests
......
#ifdef HAVE_GTEST
#include <gtest/gtest.h>
using namespace TNL;
TEST( DummyTest, basicTest )
{
const bool tr = true;
const bool fa = false;
const int two = 2;
const int ten = 10;
EXPECT_EQ(tr, true);
EXPECT_EQ(fa, false);
EXPECT_EQ(two, 2);
EXPECT_EQ(ten, 5); // fail expected
}
#endif
#include "main.h"
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