moved from Catch to doctest for unit tests
This commit is contained in:
parent
e5753b14a8
commit
2f44ac1def
52 changed files with 5517 additions and 11854 deletions
|
@ -4,7 +4,7 @@
|
|||
|
||||
# additional flags
|
||||
CXXFLAGS += -std=c++11 -Wall -Wextra -pedantic -Wcast-align -Wcast-qual -Wno-ctor-dtor-privacy -Wdisabled-optimization -Wformat=2 -Winit-self -Wmissing-declarations -Wmissing-include-dirs -Wold-style-cast -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-conversion -Wsign-promo -Wstrict-overflow=5 -Wswitch -Wundef -Wno-unused -Wnon-virtual-dtor -Wreorder -Wdeprecated -Wno-float-equal
|
||||
CPPFLAGS += -I ../single_include -I . -I thirdparty/catch -I thirdparty/fifo_map -DCATCH_CONFIG_FAST_COMPILE
|
||||
CPPFLAGS += -I ../single_include -I . -I thirdparty/doctest -I thirdparty/fifo_map -DDOCTEST_CONFIG_SUPER_FAST_ASSERTS
|
||||
|
||||
SOURCES = src/unit.cpp \
|
||||
src/unit-algorithms.cpp \
|
||||
|
@ -63,11 +63,11 @@ clean:
|
|||
# single test file
|
||||
##############################################################################
|
||||
|
||||
json_unit: $(OBJECTS) ../single_include/nlohmann/json.hpp thirdparty/catch/catch.hpp
|
||||
json_unit: $(OBJECTS) ../single_include/nlohmann/json.hpp thirdparty/doctest/doctest.h
|
||||
@echo "[CXXLD] $@"
|
||||
@$(CXX) $(CXXFLAGS) $(LDFLAGS) $(OBJECTS) -o $@
|
||||
|
||||
%.o: %.cpp ../single_include/nlohmann/json.hpp thirdparty/catch/catch.hpp
|
||||
%.o: %.cpp ../single_include/nlohmann/json.hpp thirdparty/doctest/doctest.h
|
||||
@echo "[CXX] $@"
|
||||
@$(CXX) $(CXXFLAGS) $(CPPFLAGS) -c $< -o $@
|
||||
|
||||
|
@ -76,7 +76,7 @@ json_unit: $(OBJECTS) ../single_include/nlohmann/json.hpp thirdparty/catch/catch
|
|||
# individual test cases
|
||||
##############################################################################
|
||||
|
||||
test-%: src/unit-%.o src/unit.o ../single_include/nlohmann/json.hpp thirdparty/catch/catch.hpp
|
||||
test-%: src/unit-%.o src/unit.o ../single_include/nlohmann/json.hpp thirdparty/doctest/doctest.h
|
||||
@echo "[CXXLD] $@"
|
||||
@$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) $< src/unit.o -o $@
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue