Configure workspace
This commit is contained in:
25
.vscode/c_cpp_properties.json
vendored
Normal file
25
.vscode/c_cpp_properties.json
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Win32",
|
||||||
|
"includePath": [
|
||||||
|
"${workspaceFolder}/utility/unity/core",
|
||||||
|
"${workspaceFolder}/utility/unity/fixture",
|
||||||
|
// "${workspaceFolder}/test/oled/helpers/inc",
|
||||||
|
// "${workspaceFolder}/test/oled/",
|
||||||
|
"${workspaceFolder}/cmd_parser/",
|
||||||
|
"${workspaceFolder}/**"
|
||||||
|
],
|
||||||
|
"defines": [
|
||||||
|
"_DEBUG",
|
||||||
|
"UNICODE",
|
||||||
|
"_UNICODE"
|
||||||
|
],
|
||||||
|
"compilerPath": "C:\\Apps\\mingw64\\bin\\gcc.exe",
|
||||||
|
"cStandard": "gnu17",
|
||||||
|
"cppStandard": "gnu++17",
|
||||||
|
"intelliSenseMode": "windows-gcc-x64"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"version": 4
|
||||||
|
}
|
||||||
@@ -15,4 +15,5 @@ add_definitions(${GLOBAL_DEFINITION})
|
|||||||
add_subdirectory(utility/unity unity)
|
add_subdirectory(utility/unity unity)
|
||||||
link_libraries(unity)
|
link_libraries(unity)
|
||||||
|
|
||||||
add_subdirectory(test/oled oled)
|
# add_subdirectory(test/oled oled)
|
||||||
|
add_subdirectory(test/cmd_parser cmd_parser)
|
||||||
0
cmd_parser/cmd_parser.c
Normal file
0
cmd_parser/cmd_parser.c
Normal file
2
cmd_parser/cmd_parser.h
Normal file
2
cmd_parser/cmd_parser.h
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
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