init
This commit is contained in:
commit
2f3a28e89c
10 changed files with 150 additions and 0 deletions
7
test/CMakeLists.txt
Normal file
7
test/CMakeLists.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
find_package(Catch2 3 REQUIRED)
|
||||
|
||||
add_executable(test test.cpp)
|
||||
|
||||
target_link_libraries(test PRIVATE Catch2::Catch2WithMain)
|
||||
|
||||
target_link_libraries(test PRIVATE src)
|
1
test/Catch2
Submodule
1
test/Catch2
Submodule
|
@ -0,0 +1 @@
|
|||
Subproject commit 3013cb897b5706e8532507cb2b6ac33e1fc35d93
|
10
test/test.cpp
Normal file
10
test/test.cpp
Normal file
|
@ -0,0 +1,10 @@
|
|||
#include <catch2/catch_test_macros.hpp>
|
||||
#include "library.h"
|
||||
|
||||
TEST_CASE("This test should pass") {
|
||||
REQUIRE(hello() == 0);
|
||||
}
|
||||
|
||||
TEST_CASE("This test should fail") {
|
||||
REQUIRE(hello() == 1);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue