C ordening

This commit is contained in:
Rens Pastoor
2025-05-27 23:26:28 +02:00
parent 39269a71a7
commit 517087ccc1
207 changed files with 0 additions and 4278 deletions

View File

@@ -0,0 +1,16 @@
#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_skater_tests();
int main (int argc, char * argv[])
{
UnityTestModule allModules[] = { { "skater", run_skater_tests}
};
size_t number_of_modules = sizeof(allModules)/sizeof(allModules[0]);
return UnityTestModuleRun(argc, argv, allModules, number_of_modules);
}

View File

@@ -0,0 +1,41 @@
#include <string.h>
// add your include here
#include "unity.h"
#include "unity_test_module.h"
#include "skater.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 skater_setUp(void)
{
// This is run before EACH test
}
void skater_tearDown(void)
{
// This is run after EACH test
}
// TODO:
// - Rename and change this test to something usefull
// - Add more tests
// - Remove this comment :)
// Should you need a list of all TEST_ASSERT macros: take a look
// at unity.h
void test_skater_EmptyTest(void)
{
TEST_ASSERT_EQUAL(1, 0);
}
void run_skater_tests()
{
UnityRegisterSetupTearDown( skater_setUp, skater_tearDown);
MY_RUN_TEST(test_skater_EmptyTest);
UnityUnregisterSetupTearDown();
}