Something went wrong. Try again.
This is my attempt at a basic rendering engine in C
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859#include "deps/munit.h"#include "tests.c"
static const MunitSuite suites[] = {#define SUITE(x) x, SUITES(SUITE) { NULL, NULL, NULL, 0, MUNIT_SUITE_OPTION_NONE }};
static const MunitSuite test_suite = { "", nullptr, (void*)suites, 1, MUNIT_SUITE_OPTION_NONE};
int main(int argc, char* argv[MUNIT_ARRAY_PARAM(argc + 1)]) {#if PTSD_WINDOWS // currently munit assumes windows doesn't support // colour output, it does you just have to turn it on // I don't feel like doing a fix because it's trivial // and anyone can do it, plus it's intentionally made // so that if the version of windows used doesn't // support ansi escapes, it'll just fail silently char *extra_args[] = { "--color", "always", };
char *argv2[argc + 1 + countof(extra_args)]; for (usize i = 0; i < (usize)argc; i++) argv2[i] = argv[i];
for (usize i = 0; i < countof(extra_args); i++) argv[argc + i] = extra_args[i]; argv2[argc + countof(extra_args)] = argv[argc]; argc = argc + countof(extra_args);#endif
return munit_suite_main(&test_suite, (void*) "µnit", argc, argv);}
#pragma clang diagnostic push#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#if PTSD_WINDOWS#define read _read#define write _write#define dup _dup#define dup2 _dup2#define fileno _fileno#define close _close#define isatty _isatty#endif#include "deps/munit.c"
#pragma clang diagnostic pop