From 725662a623ac36d44d2b44c568d8dd6c3eeeeca1 Mon Sep 17 00:00:00 2001 From: Mitya Selivanov Date: Thu, 16 Jan 2025 03:38:24 +0100 Subject: Drag and drop impl on X11 (not tested) --- test.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) (limited to 'test.c') diff --git a/test.c b/test.c index 3051910..fc6088f 100644 --- a/test.c +++ b/test.c @@ -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++; } } } -- cgit v1.2.3