Testing for nondeterminism in plunit

The first set is what this is all intended to do.

I see no reason why would want to verify that a predicate succeeds and leaves a choice point (but no second answer). If you want to know whether it can produce multiple answers use the all recipe.

In the very unlikely case you want to test success is nondet, do

    call_cleanup(test_supposed_to_be_nondet, Det=true),
    assertion(var(Det)).

The all tests are supposed to run findall/3, so no non-determinism will be left.

2 Likes