add ffi tests using f64

This commit is contained in:
Bennet Bleßmann
2025-01-20 23:00:03 +01:00
committed by Bennet Bleßmann
parent f91aedcc2f
commit 9d8906da30
4 changed files with 129 additions and 0 deletions

10
tests-pl/ffi_f64_nan.pl Normal file
View File

@@ -0,0 +1,10 @@
:- use_module(library(os)).
:- use_module(library(ffi)).
test :-
getenv("ffi_f64_nan_LIB", LIB),
use_foreign_module(LIB, ['ffi_f64_nan'([], f64)]),
ffi:'ffi_f64_nan'(N),
_ is round(N).
:- initialization(test).