Added google testing library
This commit is contained in:
12
tests/CMakeLists.txt
Normal file
12
tests/CMakeLists.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
# Creates the binary to run the tests #
|
||||
file (GLOB TestSources src/*.cpp inc/*.h)
|
||||
add_executable(LXC_Tests ${TestSources})
|
||||
|
||||
# Links with GoogleTest #
|
||||
target_link_libraries(LXC_Tests
|
||||
gtest
|
||||
gtest_main
|
||||
)
|
||||
|
||||
# Registers the test #
|
||||
include(GoogleTest)
|
||||
11
tests/src/LXC_Tests.cpp
Normal file
11
tests/src/LXC_Tests.cpp
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
TEST(IWantSomeTestsToPass, BasicTest1)
|
||||
{
|
||||
EXPECT_EQ(1 + 1, 2);
|
||||
}
|
||||
|
||||
TEST(IWantSomeTestsToPass, BasicTest2)
|
||||
{
|
||||
EXPECT_EQ(1 + 2, 2);
|
||||
}
|
||||
Reference in New Issue
Block a user