Compare commits
2 commits
e966625043
...
133f8e3768
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
133f8e3768 | ||
|
|
2e8273e81d |
18 changed files with 182 additions and 9 deletions
0
.template_files/.template_files/.template_files_git_dir
Normal file
0
.template_files/.template_files/.template_files_git_dir
Normal file
7
.template_files/.template_files/modules/CMakeLists.txt
Normal file
7
.template_files/.template_files/modules/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
add_library(module_name STATIC
|
||||
module_name.c
|
||||
)
|
||||
|
||||
target_include_directories(module_name PUBLIC
|
||||
${CMAKE_CURRENT_LIST_DIR}
|
||||
)
|
||||
10
.template_files/.template_files/modules/TestCMakeLists.txt
Normal file
10
.template_files/.template_files/modules/TestCMakeLists.txt
Normal file
|
|
@ -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
|
||||
)
|
||||
16
.template_files/.template_files/modules/module_name.c
Normal file
16
.template_files/.template_files/modules/module_name.c
Normal file
|
|
@ -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;
|
||||
}
|
||||
14
.template_files/.template_files/modules/module_name.h
Normal file
14
.template_files/.template_files/modules/module_name.h
Normal file
|
|
@ -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
|
||||
0
.template_files/.template_files/modules/modules_git_dir
Normal file
0
.template_files/.template_files/modules/modules_git_dir
Normal file
38
.template_files/.template_files/modules/test_module_name.cpp
Normal file
38
.template_files/.template_files/modules/test_module_name.cpp
Normal file
|
|
@ -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);
|
||||
}
|
||||
|
||||
0
.template_files/.template_files_git_dir
Normal file
0
.template_files/.template_files_git_dir
Normal file
7
.template_files/modules/CMakeLists.txt
Normal file
7
.template_files/modules/CMakeLists.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
add_library(module_name STATIC
|
||||
module_name.c
|
||||
)
|
||||
|
||||
target_include_directories(module_name PUBLIC
|
||||
${CMAKE_CURRENT_LIST_DIR}
|
||||
)
|
||||
10
.template_files/modules/TestCMakeLists.txt
Normal file
10
.template_files/modules/TestCMakeLists.txt
Normal file
|
|
@ -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
|
||||
)
|
||||
16
.template_files/modules/module_name.c
Normal file
16
.template_files/modules/module_name.c
Normal file
|
|
@ -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;
|
||||
}
|
||||
20
.template_files/modules/module_name.h
Normal file
20
.template_files/modules/module_name.h
Normal file
|
|
@ -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
|
||||
0
.template_files/modules/modules_git_dir
Normal file
0
.template_files/modules/modules_git_dir
Normal file
38
.template_files/modules/test_module_name.cpp
Normal file
38
.template_files/modules/test_module_name.cpp
Normal file
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
#
|
||||
#Sat Jul 27 12:00:17 PDT 2024
|
||||
#Sat Jul 27 12:25:33 PDT 2024
|
||||
attiny404.com-microchip-mplab-mdbcore-PK5Tool-PK5ToolImpl.md5=8ed9aa4326bfc0c1a849e697826741b7
|
||||
attiny404.languagetoolchain.version=2.46
|
||||
attiny404.com-microchip-mplab-nbide-toolchain-xc8-XC8LanguageToolchain.md5=bf89cdcdd6c0a49174fe4b605ef2b42d
|
||||
conf.ids=,attiny404
|
||||
host.id=2ov5-ff4p-rv
|
||||
configurations-xml=635c55ff9add3625ec6ff71ce27eca38
|
||||
configurations-xml=ad49d381d9f8f8cc8509eb7f94bc8af6
|
||||
com-microchip-mplab-nbide-embedded-makeproject-MakeProject.md5=f612087c95360c842296d189edfe3321
|
||||
attiny404.languagetoolchain.dir=/opt/microchip/xc8/v2.46/bin
|
||||
proj.dir=/home/ronin/Documents/projects/freelance/laith_naaman/Low
|
||||
|
|
|
|||
|
|
@ -214,6 +214,8 @@
|
|||
<property key="memories.programmemory" value="true"/>
|
||||
<property key="memories.programmemory.ranges" value="0-7ff"/>
|
||||
<property key="poweroptions.powerenable" value="true"/>
|
||||
<property key="programmerToGoFilePath"
|
||||
value="/home/ronin/Documents/projects/freelance/laith_naaman/Low/debug/default/fg004a_ptg"/>
|
||||
<property key="programmerToGoImageName" value="fg004a_ptg"/>
|
||||
<property key="programoptions.donoteraseauxmem" value="false"/>
|
||||
<property key="programoptions.eraseb4program" value="true"/>
|
||||
|
|
|
|||
|
|
@ -2,11 +2,6 @@
|
|||
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
|
||||
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
|
||||
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
||||
<group>
|
||||
<file>file:/home/ronin/Documents/projects/freelance/laith_naaman/fg004a_test.X/src/load/load.c</file>
|
||||
<file>file:/home/ronin/Documents/projects/freelance/laith_naaman/fg004a_test.X/src/zero_cross_detection/zero_cross_detection.c</file>
|
||||
<file>file:/home/ronin/Documents/projects/freelance/laith_naaman/fg004a_test.X/src/main.c</file>
|
||||
<file>file:/home/ronin/Documents/projects/freelance/laith_naaman/fg004a_test.X/src/usart/usart.c</file>
|
||||
</group>
|
||||
<group/>
|
||||
</open-files>
|
||||
</project-private>
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ TEST_GROUP(test_TriacOut)
|
|||
{
|
||||
void setup()
|
||||
{
|
||||
UT_PTR_SET(Delay_MicroSeconds, FakeDelay);
|
||||
//UT_PTR_SET(Delay_MicroSeconds, FakeDelay);
|
||||
}
|
||||
void teardown()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue