diff options
author | Mitya Selivanov <automainint@guattari.tech> | 2025-01-16 03:38:24 +0100 |
---|---|---|
committer | Mitya Selivanov <automainint@guattari.tech> | 2025-01-16 03:38:24 +0100 |
commit | 725662a623ac36d44d2b44c568d8dd6c3eeeeca1 (patch) | |
tree | 50afdc84553f44ab0dc7dff425752e87f0a5e661 /test.c | |
parent | c6c72f54ea7f25defa7d39216f7713c46b873362 (diff) | |
download | reduced_system_layer-725662a623ac36d44d2b44c568d8dd6c3eeeeca1.zip |
Drag and drop impl on X11 (not tested)
Diffstat (limited to 'test.c')
-rw-r--r-- | test.c | 22 |
1 files changed, 16 insertions, 6 deletions
@@ -60,10 +60,23 @@ typedef unsigned u32; typedef unsigned long long u64; typedef char c8; typedef int c32; -typedef signed char b8; +typedef unsigned char b8; typedef float f32; typedef double f64; +typedef struct { f64 x, y; } vec2; +typedef struct { f64 x, y, z; } vec3; +typedef struct { f64 x, y, z, w; } vec4; +typedef struct { f32 x, y; } vec2_f32; +typedef struct { f32 x, y, z; } vec3_f32; +typedef struct { f32 x, y, z, w; } vec4_f32; +typedef struct { i64 x, y; } vec2_i64; +typedef struct { i64 x, y, z; } vec3_i64; +typedef struct { i64 x, y, z, w; } vec4_i64; +typedef struct { f64 v[ 4]; } mat2; +typedef struct { f64 v[ 9]; } mat3; +typedef struct { f64 v[16]; } mat4; + #endif // TYPES_HEADER_GUARD_ // ================================================================ @@ -352,7 +365,7 @@ static void test_handle_signal(i32 signum) { longjmp(test_restore_execution, signum); } -static void test_setup_signals() { +static void test_setup_signals(void) { for (u32 i = 0; i < sizeof signums_ / sizeof *signums_; i++) signal(signums_[i], test_handle_signal); } @@ -696,7 +709,7 @@ void bench_register(c8 const *name, c8 const *file, bench_run_fn fn) { } } -static void bench_setup_signals() { +static void bench_setup_signals(void) { for (u32 i = 0; i < sizeof signums_ / sizeof *signums_; i++) signal(signums_[i], test_handle_signal); } @@ -726,7 +739,6 @@ static i32 compare_32_(void const *x_, void const *y_) { } i32 run_benchmarks(i32 argc, c8 **argv) { - i32 success_count = 0; i32 status = 0; i32 no_color = 0; i32 line_width = 20; @@ -895,7 +907,6 @@ i32 run_benchmarks(i32 argc, c8 **argv) { if (bench->repeats <= 0) { no_color || print_color_(yellow_); printf(" 0 runs\n"); - success_count++; } else if (bench_status == 0) { no_color || print_color_(red_); printf(" FAIL\n"); @@ -922,7 +933,6 @@ i32 run_benchmarks(i32 argc, c8 **argv) { printf("%-9g", (f64) roof * 0.001); no_color || print_color_(light_); printf(" %d runs\n", repeats); - success_count++; } } } |