Configure workspace
This commit is contained in:
20
test/cmd_parser/CMakeLists.txt
Normal file
20
test/cmd_parser/CMakeLists.txt
Normal file
@@ -0,0 +1,20 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
set(TEST_NAME cmd_parser)
|
||||
|
||||
set(INCLUDE_DIRS
|
||||
../../cmd_parser
|
||||
helpers/inc
|
||||
)
|
||||
|
||||
set(SRCS
|
||||
../../cmd_parser/cmd_parser.c
|
||||
|
||||
# helpers/src/
|
||||
cmd_parser_test.c
|
||||
)
|
||||
|
||||
add_definitions(-DTEST)
|
||||
add_executable(${TEST_NAME} ${SRCS})
|
||||
|
||||
target_include_directories(${TEST_NAME} PUBLIC ${INCLUDE_DIRS})
|
||||
28
test/cmd_parser/cmd_parser_test.c
Normal file
28
test/cmd_parser/cmd_parser_test.c
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "stdlib.h"
|
||||
#include "string.h"
|
||||
#include "unity.h"
|
||||
#include "cmd_parser.h"
|
||||
|
||||
|
||||
void setUp(void)
|
||||
{
|
||||
}
|
||||
|
||||
void tearDown(void)
|
||||
{
|
||||
}
|
||||
|
||||
void test_one(void)
|
||||
{
|
||||
TEST_FAIL();
|
||||
}
|
||||
|
||||
|
||||
|
||||
int main(void)
|
||||
{
|
||||
UNITY_BEGIN();
|
||||
RUN_TEST(test_one);
|
||||
|
||||
return UNITY_END();
|
||||
}
|
||||
Reference in New Issue
Block a user