test(valid_my_member_int, [nondet]) :-
my_member_int(1,[1,2,3]),
\+ my_member_int(1,[4,5]).
test(invalid_my_member_int, [throws(_)]) :-
my_member_int(a,[1,2,3]).
test(valid_my_member_specific, [nondet]) :-
my_member_specific(1,[1,2,3]),
\+ my_member_specific(a,[b,c]).
test(tree_no_int, [throws(_)]) :-
my_member_specific(node(empty, 1, empty), [1,2,3]).
test(tree_no_atom, [throws(_)]) :-
my_member_specific(node(node(empty, a, empty), b, empty), [these, are, atoms]).
test(instantiated_call, [nondet]) :-
my_member(a, [a, b, c]).
test(partly_instantiated, [nondet]) :-
my_member(_, [a, b, c]).
test(partly_instantiated_not_conform, [nondet, throws(_)]) :-
% second argument is not a list
my_member(a, _).
test(partly_instantiated3, [nondet]) :-
my_member(c, [a, _, c]).
test(all_variables_not_conform, [nondet, throws(_)]) :-
my_member(_, _).
test(not_conform, [throws(_)]) :-
my_member([], a).
test(nonconform_call, [throws(_)]) :-
my_compound_foo(foo(_)).
test(conform_call1, [nondet]) :-
my_compound_foo(foo(1)).
test(conform_call2, [nondet]) :-
my_compound_foo(foo(bar)).
test(not_conform, [throws(_)]) :-
my_compound_foo(bar(_)).
test(conform_var, [throws(_)]) :-
my_tuple_with_incorrect_spec([a, _]).
test(conform_var2, [throws(_)]) :-
my_tuple_with_incorrect_spec([_, a]).
test(nonconform_both_var, [throws(_)]) :-
my_tuple_with_incorrect_spec([_, _]).
test(conform, [nondet]) :-
atom_member(a, [a,b,c]).
test(not_conform, [throws(_)]) :-
atom_member(a, X), !,
X = [a,b,c].
test(not_conform2, [throws(_)]) :-
atom_member(a, [a,_|_]).
test(not_conform3, [throws(_)]) :-
atom_member(a, [1,_|_]).
test(not_conform1, [throws(_)]) :-
my_atomic(foo(_)).
test(not_conform2, [throws(_)]) :-
\+ my_atomic([_]).
test(not_conform3, [throws(_)]) :-
my_atomic([[2]]).
test(not_conform4, [throws(_)]) :-
\+ my_atomic([_]).
test(nonconform, [throws(_)]) :-
my_or_test(_).
test(nonconform, [throws(_)]) :-
my_and_test([1]).
test(nonconform2, [throws(_)]) :-
my_and_test(_).
test(nonconform, [throws(_)]) :-
invariant_violator(_).
test(conform, [nondet]) :-
partial_instantiator([_,_]).
test(conform2, [nondet]) :-
partial_instantiator([X, _]), X == 1.
test(conform3, [nondet]) :-
partial_instantiator([_, 2]).
test(conform4, [nondet]) :-
partial_instantiator([1, 2]).
test(nonconform, [throws(_)]) :-
partial_instantiator([a, 2]).
test(nonconform2, [throws(_)]) :-
findall(A, partial_instantiator(A), _).
test(postcondition_violated, [throws(_)]) :-
bind_to_zero(_).
test(atoms_are_not, [throws(_)]) :-
this_pred_has_an_extern_spec(a).