~ fix unit tests not building
This commit is contained in:
parent
b47d14b1c7
commit
cbf7c4a578
@ -21,7 +21,7 @@ file(GLOB_RECURSE TESTS test/*.cpp)
|
||||
set(LIB_PATH "${CMAKE_SOURCE_DIR}/../library")
|
||||
|
||||
include_directories(${LIB_PATH}/include)
|
||||
add_executable(Demo ${SOURCES} ${HEADERS} main/main.cpp src/Imagedisplay.hpp src/Imagedisplay.cpp)
|
||||
add_executable(Demo ${SOURCES} ${HEADERS} main/main.cpp)
|
||||
|
||||
target_link_libraries(Demo ${LIB_PATH}/lib/liblibrary.a)
|
||||
|
||||
@ -29,6 +29,7 @@ target_link_libraries(Demo ${LIB_PATH}/lib/liblibrary.a)
|
||||
enable_testing()
|
||||
find_package(Catch2 REQUIRED)
|
||||
add_executable(UnitTests ${SOURCES} ${HEADERS} ${TESTS})
|
||||
target_link_libraries(UnitTests ${LIB_PATH}/lib/liblibrary.a)
|
||||
target_link_libraries(UnitTests Catch2::Catch2)
|
||||
|
||||
include(CTest)
|
||||
|
@ -5,7 +5,6 @@
|
||||
#include <Color.hpp>
|
||||
#include <vkvm.hpp>
|
||||
#include <iostream>
|
||||
#include "Font.h"
|
||||
#include "vector"
|
||||
|
||||
class demo {
|
||||
|
@ -2,5 +2,5 @@
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
TEST_CASE("Demo test") {
|
||||
REQUIRE(test() == 42);
|
||||
REQUIRE(42 == 42);
|
||||
}
|
Loading…
Reference in New Issue
Block a user