This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/packages/real/examples/test_real.pl
2015-10-13 08:25:49 +01:00

29 lines
484 B
Prolog

:- module(test_real,
[ test_real/1
]).
:- asserta(user:file_search_path(foreign, '.')).
:- asserta(user:file_search_path(library, '.')).
:- asserta(user:file_search_path(library, '../plunit')).
:- use_module( library(real) ).
:- use_module(library(plunit)).
test_real(_) :-
run_tests([ real
]).
:- begin_tests(real).
test(int_array) :-
x <- c(1,2,3),
X <- x,
X == [1,2,3].
test(mixed_array) :-
y <- c(1,2,3.1),
Y <- y,
Y = [1.0,2.0,3.1].
:- end_tests(real).