Merge pull request #1124 from triska/test_corrections

several corrections to test cases
This commit is contained in:
Mark Thom
2021-12-04 16:23:31 -07:00
committed by GitHub
2 changed files with 18 additions and 18 deletions

View File

@@ -15,7 +15,7 @@ test_queries_on_builtins :-
\+ atom(atop(the_trees)), \+ atom(atop(the_trees)),
\+ atomic(_), \+ atomic(_),
atomic(a), atomic(a),
atomic("string"), \+ atomic("string"),
atomic([]), atomic([]),
atomic(1), atomic(1),
atomic(0), atomic(0),
@@ -33,7 +33,7 @@ test_queries_on_builtins :-
arg(2, f(arg, not_arg, not_arg), not_arg), arg(2, f(arg, not_arg, not_arg), not_arg),
arg(3, f(arg, not_arg, not_arg), not_arg), arg(3, f(arg, not_arg, not_arg), not_arg),
functor(f(a,b,c), f, 3), functor(f(a,b,c), f, 3),
catch(functor(_,"sdf",3),error(type_error(atom,[s,d,f]),_),true), catch(functor(_,"sdf",3),error(type_error(atomic,[s,d,f]),_),true),
f(1,2,3) =.. [f,1,2,3], f(1,2,3) =.. [f,1,2,3],
length([a,b,c], 3), length([a,b,c], 3),
\+ \+ copy_term([[[[X,Y],Y],X]],[[[[Z,V],V],Z]]), \+ \+ copy_term([[[[X,Y],Y],X]],[[[[Z,V],V],Z]]),
@@ -59,16 +59,16 @@ test_queries_on_builtins :-
\+ compound([]), \+ compound([]),
\+ compound(3.14159269), \+ compound(3.14159269),
\+ compound(3), \+ compound(3),
\+ compound("sdfsa"), compound("sdfsa"),
\+ compound(atom), \+ compound(atom),
\+ string(functor(string)), \+ partial_string(functor(partial_string)),
\+ string(3.14159269), \+ partial_string(3.14159269),
\+ string(3), \+ partial_string(3),
\+ string(f(X)), \+ partial_string(f(X)),
string("sdfsa"), partial_string("sdfsa"),
\+ string(atom), \+ partial_string(atom),
\+ string([1,2,3]), \+ partial_string([1,2,3]),
\+ string([1,2,X]), \+ partial_string([1,2,X]),
\+ \+ ( X = nonvar, nonvar(X) ), \+ \+ ( X = nonvar, nonvar(X) ),
\+ nonvar(X), \+ nonvar(X),
\+ \+ nonvar(f(X)), \+ \+ nonvar(f(X)),
@@ -97,10 +97,10 @@ test_queries_on_builtins :-
\+ (X @>= Y), \+ (X @>= Y),
\+ (X @> Y), \+ (X @> Y),
\+ \+ (X @>= X), \+ \+ (X @>= X),
\+ (atom @=< "string"), atom @=< "string",
\+ \+ (atom @=< atom), \+ \+ (atom @=< atom),
\+ (atom @=< aaa), \+ (atom @=< aaa),
\+ \+ (atom @>= "string"), \+ \+ (atom @=< "string"),
\+ \+ (X is 3 + 3,X @>= Y), \+ \+ (X is 3 + 3,X @>= Y),
\+ \+ (f(X) @>= f(X)), \+ \+ (f(X) @>= f(X)),
\+ \+ (f(X) @>= a), \+ \+ (f(X) @>= a),
@@ -109,12 +109,12 @@ test_queries_on_builtins :-
\+ ([1,2,3] @=< [1,2]), \+ ([1,2,3] @=< [1,2]),
\+ \+ ([] @=< [1,2]), \+ \+ ([] @=< [1,2]),
\+ ([] @< 1), \+ ([] @< 1),
\+ ([] @< "string"), [] @< "string",
\+ ([] @< atom), [] @< atom,
atom @< [], \+ atom @< [],
1.1 @< 1, 1.1 @< 1,
1.0 @=< 1, 1.0 @=< 1,
1 @=< 1.0, \+ 1 @=< 1.0,
\+ \+ (variant(X, Y)), \+ \+ (variant(X, Y)),
\+ (variant(f(X), f(x))), \+ (variant(f(X), f(x))),
\+ \+ (variant(X, X)), \+ \+ (variant(X, X)),

View File

@@ -48,7 +48,7 @@ test_queries_on_rules :-
\+ \+ retract((p(f(f(a), g(b), X), g(b), h) :- q(X, _))), \+ \+ retract((p(f(f(a), g(b), X), g(b), h) :- q(X, _))),
\+ \+ assertz((p(_, f(_, Y, _)) :- h(Y))), \+ \+ assertz((p(_, f(_, Y, _)) :- h(Y))),
assertz(h(y)), assertz(h(y)),
\+ \+ findall(Y, p(_, f(_, Y, _)), [y]). \+ \+ findall(Y, p(_, f(_, Y, _)), [y]),
p(_, f(_, y, _)), p(_, f(_, y, _)),
\+ p(_, f(_, z, _)), \+ p(_, f(_, z, _)),
\+ \+ retract((p(_, f(_, Y, _)) :- h(Y))), \+ \+ retract((p(_, f(_, Y, _)) :- h(Y))),