This commit is contained in:
Rens Pastoor
2025-05-27 22:41:46 +02:00
parent d141296aea
commit 11b391b8a1
416 changed files with 25232 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
#include <string.h>
#include "administration.h"
#include "unity.h"
#include "unity_test_module.h"
// I rather dislike keeping line numbers updated, so I made my own macro to ditch the line number
#define MY_RUN_TEST(func) RUN_TEST(func, 0)
void administration_setUp(void)
{
// This is run before EACH test
}
void administration_tearDown(void)
{
// This is run after EACH test
}
void test_EmptyTest(void)
{
TEST_ASSERT_EQUAL(1, 0);
}
//add here your testcases
void run_administration_tests()
{
UnityRegisterSetupTearDown(administration_setUp, administration_tearDown);
MY_RUN_TEST(test_EmptyTest);
UnityUnregisterSetupTearDown();
}

View File

@@ -0,0 +1,34 @@
#include <string.h>
#include "file_element.h"
#include "unity.h"
#include "unity_test_module.h"
// I rather dislike keeping line numbers updated, so I made my own macro to ditch the line number
#define MY_RUN_TEST(func) RUN_TEST(func, 0)
void file_element_setUp(void)
{
// This is run before EACH test
}
void file_element_tearDown(void)
{
// This is run after EACH test
}
void test_EmptyTest_file(void)
{
TEST_ASSERT_EQUAL(1, 0);
}
void run_file_element_tests()
{
UnityRegisterSetupTearDown( file_element_setUp, file_element_tearDown);
MY_RUN_TEST(test_EmptyTest_file);
UnityUnregisterSetupTearDown();
}

19
C/C2/test/main.c Normal file
View File

@@ -0,0 +1,19 @@
#include "unity_test_module.h"
/* As an alternative for header files we can declare that
* the following methos are available 'extern'ally.
*/
extern void run_administration_tests();
extern void run_file_element_tests();
int main (int argc, char * argv[])
{
UnityTestModule allModules[] = { { "administration", run_administration_tests} ,
{ "file_element", run_file_element_tests}
};
size_t number_of_modules = sizeof(allModules)/sizeof(allModules[0]);
return UnityTestModuleRun(argc, argv, allModules, number_of_modules);
}