aboutsummaryrefslogtreecommitdiff
path: root/tests/ler_f.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ler_f.c')
-rw-r--r--tests/ler_f.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/tests/ler_f.c b/tests/ler_f.c
index ecb4b3f..fa08b24 100644
--- a/tests/ler_f.c
+++ b/tests/ler_f.c
@@ -9,22 +9,16 @@ int main()
EJIT_OPERAND_FPR(1, EJIT_TYPE(double))
};
- struct ejit_func *f = ejit_create_func(EJIT_TYPE(double), 2, operands);
+ struct ejit_func *f = ejit_create_func(EJIT_TYPE(long), 2, operands);
ejit_ler_f(f, EJIT_GPR(0), EJIT_FPR(0), EJIT_FPR(1));
ejit_retr(f, EJIT_GPR(0));
- ejit_select_compile_func(f, 1, 2, EJIT_USE64(long), do_jit);
+ ejit_select_compile_func(f, 1, 2, EJIT_USE64(double), do_jit);
- assert(ejit_run_func_2(f, EJIT_ARG(1, long), EJIT_ARG(1, long)) == 1);
- assert(ejit_run_func_2(f, EJIT_ARG(1, long), EJIT_ARG(0, long)) == 1);
-
- assert(ejit_run_func_2(f,
- EJIT_ARG(0x0fffffffffffffff, long),
- EJIT_ARG(0x0ffffffffffffff0, long)) == 1);
-
- assert(ejit_run_func_2(f,
- EJIT_ARG(0x7fffffffffffffff, long),
- EJIT_ARG(0x6fffffffffffffff, long)) == 0);
+ assert(erf2(f, EJIT_ARG(1, double), EJIT_ARG(1, double)) == 1);
+ assert(erf2(f, EJIT_ARG(1, double), EJIT_ARG(0, double)) == 0);
+ assert(erf2(f, EJIT_ARG(-1, double), EJIT_ARG(0, double)) == 1);
+ assert(erf2(f, EJIT_ARG(-1, double), EJIT_ARG(-1, double)) == 1);
ejit_destroy_func(f);
}