Skip to content

Commit b207e68

Browse files
committed
First draft of unit test code.
Former-commit-id: 3e6008a
1 parent f6f20a6 commit b207e68

File tree

4 files changed

+18021
-0
lines changed

4 files changed

+18021
-0
lines changed

libraries/CAN/extras/test/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build/
2+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
##########################################################################
2+
cmake_minimum_required(VERSION 2.8)
3+
##########################################################################
4+
project(can-test)
5+
##########################################################################
6+
include_directories(../../src)
7+
include_directories(external/catch2/v2.13.10/include)
8+
##########################################################################
9+
set(CMAKE_CXX_STANDARD 17)
10+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
11+
##########################################################################
12+
set(TEST_TARGET ${CMAKE_PROJECT_NAME})
13+
##########################################################################
14+
set(TEST_TARGET_SRCS
15+
src/test_main.cpp
16+
)
17+
##########################################################################
18+
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
19+
##########################################################################
20+
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} "--coverage")
21+
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "--coverage -Wno-deprecated-copy")
22+
##########################################################################
23+
add_executable(
24+
${TEST_TARGET}
25+
${TEST_TARGET_SRCS}
26+
)
27+
##########################################################################

0 commit comments

Comments
 (0)