import upstream maccel baseline
Tests / test_core_function (push) Failing after 12s

This commit is contained in:
2026-03-24 12:10:31 +00:00
parent 6e948d7b39
commit 5f1254d11a
108 changed files with 18930 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
#include "../fixedptc.h"
#include "test_utils.h"
#include <assert.h>
#include <linux/limits.h>
#include <unistd.h>
int assert_string_value(char *filename, double value) {
fpt v = fpt_rconst(value);
char *_v = fptoa(v);
dbg("to_string %f = %s", value, _v);
assert_snapshot(filename, _v);
return 0;
}
#define test_str(value) \
assert(assert_string_value(__FILE_NAME__ "_" #value ".snapshot", value) == 0)
int main(void) {
test_str(0.25);
test_str(0.125);
test_str(0.3125);
test_str(-785);
print_success;
}