Skip to content

Commit c081dc9

Browse files
committedOct 25, 2018
Add unittest script and stub file.
1 parent ef6cc5c commit c081dc9

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed
 

‎src/main/test/cn105.cc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#include "unity.h"
2+
#include "../cn105.h"
3+
4+
5+
TEST_CASE("basic get/post", "webserver")
6+
{
7+
// Add test here
8+
}

‎src/main/test/component.mk

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#
2+
# "main" pseudo-component makefile.
3+
#
4+
# (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.)
5+
COMPONENT_ADD_LDFLAGS = -Wl,--whole-archive -l$(COMPONENT_NAME) -Wl,--no-whole-archive

‎test.sh

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
make -C ${IDF_PATH}/tools/unit-test-app EXTRA_COMPONENT_DIRS="${PWD}/src ${PWD}/src/components" TEST_COMPONENTS=main

0 commit comments

Comments
 (0)
Please sign in to comment.