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/plunit/examples/simple.pl

33 lines
436 B
Perl
Raw Normal View History

:- module(ex_simple, []).
2009-11-27 13:45:57 +00:00
:- use_module(library(plunit)).
2009-11-23 10:55:10 +00:00
:- begin_tests(lists).
test(true) :-
true.
test(fail) :-
\+ fail.
test(fail, [fail]) :-
fail.
test(member) :-
member(a, [a]), !.
test(member, [nondet]) :-
member(_, [a]).
test(member, [true(X == a)]) :-
member(X, [a]), !.
test(member, [all(V == [a,b,c])]) :-
member(V, [a,b,c]).
test(append) :-
append("aap", "noot", X),
X == "aapnoot".
:- end_tests(lists).