Next: , Previous: , Up: PlUnit A Unit Test Box   [Contents][Index]


10.29.3.2 Nondeterminate Tests

Nondeterminate tests succeed zero or more times. Their results can be tested using findall/3 followed by a value-check. The following are equivalent tests:

test(member5) :-
        findall(X, member(X, [a,b,c]), Xs),
        Xs == [a,b,c].

test(member6, true(Xs == [a,b,c])) :-
        findall(X, member(X, [a,b,c]), Xs).     

Send feedback on this subject.