diff --git a/.gitignore b/.gitignore index 5de6791..aded037 100644 --- a/.gitignore +++ b/.gitignore @@ -104,3 +104,4 @@ queuelogs .generated_files/flags/attiny404 dist/default dist/attiny404/production +.cache/clangd/index diff --git a/.template_files/.template_files/.template_files_git_dir b/.template_files/.template_files/.template_files_git_dir new file mode 100644 index 0000000..e69de29 diff --git a/.template_files/.template_files/modules/CMakeLists.txt b/.template_files/.template_files/modules/CMakeLists.txt new file mode 100644 index 0000000..b27bc02 --- /dev/null +++ b/.template_files/.template_files/modules/CMakeLists.txt @@ -0,0 +1,7 @@ +add_library(module_name STATIC + module_name.c +) + +target_include_directories(module_name PUBLIC + ${CMAKE_CURRENT_LIST_DIR} +) diff --git a/.template_files/.template_files/modules/TestCMakeLists.txt b/.template_files/.template_files/modules/TestCMakeLists.txt new file mode 100644 index 0000000..64f9179 --- /dev/null +++ b/.template_files/.template_files/modules/TestCMakeLists.txt @@ -0,0 +1,10 @@ +# TEST_RUNNER +add_library(test_module_name + test_module_name.cpp +) + +target_link_libraries(test_module_name + ${CPPUTEST_LIBRARIES}/libCppUTest.a + ${CPPUTEST_LIBRARIES}/libCppUTestExt.a + module_name +) diff --git a/.template_files/.template_files/modules/module_name.c b/.template_files/.template_files/modules/module_name.c new file mode 100644 index 0000000..119b0bc --- /dev/null +++ b/.template_files/.template_files/modules/module_name.c @@ -0,0 +1,16 @@ +/* + * Author: username + * Date: todays_date + * filename: module_name.c + * description: module_purpose + */ + +#include "module_name.h" + +// dumb test function +int add_two(int a) +{ + int b = a; + b += 2; + return b; +} diff --git a/.template_files/.template_files/modules/module_name.h b/.template_files/.template_files/modules/module_name.h new file mode 100644 index 0000000..e3907fd --- /dev/null +++ b/.template_files/.template_files/modules/module_name.h @@ -0,0 +1,14 @@ +/* + * Author: username + * Date: todays_date + * filename: module_name.h + * description: module_purpose + */ + +#ifndef module_name +#define module_name + + +int add_two(int a); + +#endif //module_name diff --git a/.template_files/.template_files/modules/modules_git_dir b/.template_files/.template_files/modules/modules_git_dir new file mode 100644 index 0000000..e69de29 diff --git a/.template_files/.template_files/modules/test_module_name.cpp b/.template_files/.template_files/modules/test_module_name.cpp new file mode 100644 index 0000000..d06f275 --- /dev/null +++ b/.template_files/.template_files/modules/test_module_name.cpp @@ -0,0 +1,38 @@ +/* + * Author: username + * Date: todays_date + * filename: test_module_name.c + * description: module_purpose + */ + +#include "CppUTest/CommandLineTestRunner.h" + +extern "C" +{ +#include "module_name.h" +} + +TEST_GROUP(FirstTestGroup) +{ + void setup() + { + + } + void teardown() + { + + } +}; + +TEST(FirstTestGroup, FirstTest) +{ + FAIL("Fail me!"); +} + +TEST(FirstTestGroup, SecondTest) +{ + STRCMP_EQUAL("hello", "world"); + LONGS_EQUAL(1, 2); + CHECK(false); +} + diff --git a/.template_files/.template_files_git_dir b/.template_files/.template_files_git_dir new file mode 100644 index 0000000..e69de29 diff --git a/.template_files/modules/CMakeLists.txt b/.template_files/modules/CMakeLists.txt new file mode 100644 index 0000000..b27bc02 --- /dev/null +++ b/.template_files/modules/CMakeLists.txt @@ -0,0 +1,7 @@ +add_library(module_name STATIC + module_name.c +) + +target_include_directories(module_name PUBLIC + ${CMAKE_CURRENT_LIST_DIR} +) diff --git a/.template_files/modules/TestCMakeLists.txt b/.template_files/modules/TestCMakeLists.txt new file mode 100644 index 0000000..64f9179 --- /dev/null +++ b/.template_files/modules/TestCMakeLists.txt @@ -0,0 +1,10 @@ +# TEST_RUNNER +add_library(test_module_name + test_module_name.cpp +) + +target_link_libraries(test_module_name + ${CPPUTEST_LIBRARIES}/libCppUTest.a + ${CPPUTEST_LIBRARIES}/libCppUTestExt.a + module_name +) diff --git a/.template_files/modules/module_name.c b/.template_files/modules/module_name.c new file mode 100644 index 0000000..119b0bc --- /dev/null +++ b/.template_files/modules/module_name.c @@ -0,0 +1,16 @@ +/* + * Author: username + * Date: todays_date + * filename: module_name.c + * description: module_purpose + */ + +#include "module_name.h" + +// dumb test function +int add_two(int a) +{ + int b = a; + b += 2; + return b; +} diff --git a/.template_files/modules/module_name.h b/.template_files/modules/module_name.h new file mode 100644 index 0000000..91acb63 --- /dev/null +++ b/.template_files/modules/module_name.h @@ -0,0 +1,20 @@ +/** + * @brief PUT_TEXT_HERE + * @details This file is... + * @author username + * @date todays_date + * @copyright None + * @file module_name.h + */ + +#ifndef module_name +#define module_name + + +/** + * A function that adds two to a number + * @param a The first argument + */ +int add_two(int a); + +#endif //module_name diff --git a/.template_files/modules/modules_git_dir b/.template_files/modules/modules_git_dir new file mode 100644 index 0000000..e69de29 diff --git a/.template_files/modules/test_module_name.cpp b/.template_files/modules/test_module_name.cpp new file mode 100644 index 0000000..82c2303 --- /dev/null +++ b/.template_files/modules/test_module_name.cpp @@ -0,0 +1,38 @@ +/* + * Author: username + * Date: todays_date + * filename: test_module_name.c + * description: module_purpose + */ + +#include "CppUTest/CommandLineTestRunner.h" + +extern "C" +{ +#include "module_name.h" +} + +TEST_GROUP(test_module_name) +{ + void setup() + { + + } + void teardown() + { + + } +}; + +TEST(test_module_name, FirstTest) +{ + FAIL("Fail me!"); +} + +TEST(test_module_name, SecondTest) +{ + STRCMP_EQUAL("hello", "world"); + LONGS_EQUAL(1, 2); + CHECK(false); +} +