Added dummy testcases to integrate all source files into coverage meassurement

This commit is contained in:
Stefan Strobel 2019-12-05 17:55:03 +01:00
parent cf7ac4d116
commit fe3c1e3a43
5 changed files with 67 additions and 10 deletions

View File

@ -20,16 +20,20 @@ SOURCES := src/shellmatta.c \
INCLUDES := api .
UNITTEST_SOURCES := test/unittest/test_main.cpp \
test/unittest/shellmatta_utils/test_utils_writeEcho.cpp \
test/unittest/shellmatta_utils/test_utils_shellItoa.cpp \
test/unittest/shellmatta_utils/test_utils_saveCursorPos.cpp \
test/unittest/shellmatta_utils/test_utils_restoreCursorPos.cpp \
test/unittest/shellmatta_utils/test_utils_eraseLine.cpp \
test/unittest/shellmatta_utils/test_utils_rewindCursor.cpp \
test/unittest/shellmatta_utils/test_utils_forwardCursor.cpp \
test/unittest/shellmatta_utils/test_utils_clearInput.cpp \
test/unittest/shellmatta_utils/test_utils_insertChars.cpp
UNITTEST_SOURCES := test/unittest/test_main.cpp \
test/unittest/shellmatta_utils/test_utils_writeEcho.cpp \
test/unittest/shellmatta_utils/test_utils_shellItoa.cpp \
test/unittest/shellmatta_utils/test_utils_saveCursorPos.cpp \
test/unittest/shellmatta_utils/test_utils_restoreCursorPos.cpp \
test/unittest/shellmatta_utils/test_utils_eraseLine.cpp \
test/unittest/shellmatta_utils/test_utils_rewindCursor.cpp \
test/unittest/shellmatta_utils/test_utils_forwardCursor.cpp \
test/unittest/shellmatta_utils/test_utils_clearInput.cpp \
test/unittest/shellmatta_utils/test_utils_insertChars.cpp \
test/unittest/shellmatta_autocomplete/test_autocomplete_run.cpp \
test/unittest/shellmatta_escape/test_escape_processArrowKeys.cpp \
test/unittest/shellmatta_history/test_appendHistoryByte.cpp \
test/unittest/shellmatta/test_shellmatta_doInit.cpp
INTEGRATIONTEST_SOURCES := test/integrationtest/test_main.cpp \
test/integrationtest/test_integration.cpp

View File

@ -0,0 +1,14 @@
#include "test/framework/catch.hpp"
#include "src/shellmatta.c"
#include <string.h>
TEST_CASE( "shellmatta dummy" ) {
shellmatta_instance_t inst;
//shellmatta_handle_t handle;
inst.inputCount = 0u;
//shellmatta_doInit(&inst, &handle, )
REQUIRE( inst.inputCount == 0u);
}

View File

@ -0,0 +1,13 @@
#include "test/framework/catch.hpp"
#include "src/shellmatta_autocomplete.c"
#include <string.h>
TEST_CASE( "shellmatta_autocomplete_run dummy" ) {
shellmatta_instance_t inst;
inst.inputCount = 0u;
autocomplete_run(&inst);
REQUIRE( inst.inputCount == 0u);
}

View File

@ -0,0 +1,13 @@
#include "test/framework/catch.hpp"
#include "src/shellmatta_escape.c"
#include <string.h>
TEST_CASE( "shellmatta_escape dummy" ) {
shellmatta_instance_t inst;
inst.inputCount = 0u;
escape_processArrowKeys(&inst);
REQUIRE( inst.inputCount == 0u);
}

View File

@ -0,0 +1,13 @@
#include "test/framework/catch.hpp"
#include "src/shellmatta_history.c"
#include <string.h>
TEST_CASE( "shellmatta_history dummy" ) {
shellmatta_instance_t inst;
inst.inputCount = 0u;
//appendHistoryByte(&inst, 'a');
REQUIRE( inst.inputCount == 0u);
}