diff test/test.c @ 37:4b5a557aa64f

*: turns out extern is a practical joke. rewrite to be always inline again the sample benchmark performs about 3x as well with optimizations disabled :)
author Paper <paper@tflc.us>
date Sat, 26 Apr 2025 01:04:35 -0400
parents 641d8c79b1da
children f9ca85d2f14c
line wrap: on
line diff
--- a/test/test.c	Fri Apr 25 17:40:55 2025 -0400
+++ b/test/test.c	Sat Apr 26 01:04:35 2025 -0400
@@ -3,6 +3,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <inttypes.h>
+#include <time.h>
 
 #define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))
 
@@ -113,6 +114,7 @@
 #include "test_arith.h"
 #include "test_compare.h"
 #include "test_shift.h"
+#include "test_benchmark.h"
 
 // ------------------------------------------------------------
 
@@ -120,12 +122,14 @@
 {
 	int ret = 0;
 
-	vec_init();
+	srand(time(NULL));
 
 	ret |= test_align();
 	ret |= test_arith();
 	ret |= test_compare();
 	ret |= test_shift();
 
+	test_benchmark();
+
 	return ret;
 }