Initial commit

This commit is contained in:
2026-04-24 07:24:03 +02:00
parent 14fced76f0
commit f6a1b290fc
7 changed files with 84 additions and 15 deletions
+14
View File
@@ -0,0 +1,14 @@
V0_SRC := # @copilot include everything in src
V0_TEST := # @copilot include everything in test
V0_SRC_OBJ := # @copilot implement. exampleL v0/src/main.c -> v0/bin/src/main.o
V0_TEST_OBJ := # @copilot
v0/bin/c2: $(V0_SRC OBJ)
# @copilot implement
v0/bin/test: $(V0_SRC_TEST)
# @copilot implement
# @copilot add target that builds each .c file into a .o file.
# Ensure header dependencies are tracked correctly.
+24
View File
@@ -0,0 +1,24 @@
#include "test.h"
// @copilot implement fail()
static int s_totalTests;
static int s_greenTests;
static Test[] = {
// @copilot add all tests
};
int main(int argc, char** argv) {
/*
@copilot loop over each test.
If the test is good, count the test as part of green test.
Otherwise, go to the next one.
The start of the test must log the name of the test method.
After the test, log either "[OK]" or "[FAIL]".
At the very end, log the name of each failed test and the total
number of green tests compared to the total.
*/
}
+16
View File
@@ -0,0 +1,16 @@
/**
* Contains test assertions routines.
*/
#ifndef TEST_H
#define TEST_H
// @copilot fix the syntax. This is a typedef for any function taking a void and returning void.
typedef Test void(void);
/**
* Fails a test.
* @param msg The message to print to the console.
*/
void fail(const char* msg);
#endif