aboutsummaryrefslogtreecommitdiff
path: root/tests/absr_f.c
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2024-06-29 14:43:39 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2024-06-29 14:43:39 +0300
commiteb09800cff9eec8ecbe756b193cab738d43897d2 (patch)
treef144993684dd066f3c87cfefc7673be6f5d32078 /tests/absr_f.c
parent49aa680ccdac46d1d2a7f9f250999b7ff7099548 (diff)
downloadejit-eb09800cff9eec8ecbe756b193cab738d43897d2.tar.gz
ejit-eb09800cff9eec8ecbe756b193cab738d43897d2.zip
clear up some semantics
Diffstat (limited to 'tests/absr_f.c')
-rw-r--r--tests/absr_f.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/absr_f.c b/tests/absr_f.c
index cc070b6..94a0e42 100644
--- a/tests/absr_f.c
+++ b/tests/absr_f.c
@@ -7,13 +7,14 @@ int main()
struct ejit_operand operands[1] = {
EJIT_OPERAND_FPR(0, EJIT_DOUBLE)
};
- struct ejit_func *f = ejit_create_func(EJIT_DOUBLE, 1, operands);
+ struct ejit_func *f = ejit_create_func(EJIT_TYPE(double), 1, operands);
ejit_absr_f(f, EJIT_FPR(0), EJIT_FPR(0));
ejit_retr_f(f, EJIT_FPR(0));
ejit_select_compile_func(f, 0, 1, do_jit);
- assert(ejit_run_func_f_1(f, ejit_double(0.0)) == 0.0);
- assert(ejit_run_func_f_1(f, ejit_double(-0.0)) == 0.0);
- assert(ejit_run_func_f_1(f, ejit_double(0.5)) == 0.5);
- assert(ejit_run_func_f_1(f, ejit_double(-0.5)) == 0.5);
+ assert(ejit_run_func_f_1(f, EJIT_ARG(0.0, double)) == 0.0);
+ assert(ejit_run_func_f_1(f, EJIT_ARG(-0.0, double)) == 0.0);
+ assert(ejit_run_func_f_1(f, EJIT_ARG(0.5, double)) == 0.5);
+ assert(ejit_run_func_f_1(f, EJIT_ARG(-0.5, double)) == 0.5);
+ ejit_destroy_func(f);
}