]> Repositorios git - scryer-prolog.git/commitdiff
several corrections to test cases
authorMarkus Triska <[email protected]>
Wed, 1 Dec 2021 18:43:15 +0000 (19:43 +0100)
committerMarkus Triska <[email protected]>
Wed, 1 Dec 2021 18:45:36 +0000 (19:45 +0100)
src/tests/builtins.pl
src/tests/rules.pl

index b7ba09ae510e4928f0d34cda1971964ba085de97..96b5e4c0be34aa84acab10a9def735ac4d7aebe6 100644 (file)
@@ -15,7 +15,7 @@ test_queries_on_builtins :-
     \+ atom(atop(the_trees)),
     \+ atomic(_),
     atomic(a),
-    atomic("string"),
+    \+ atomic("string"),
     atomic([]),
     atomic(1),
     atomic(0),
@@ -33,7 +33,7 @@ test_queries_on_builtins :-
     arg(2, 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),
-    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],
     length([a,b,c], 3),
     \+ \+ copy_term([[[[X,Y],Y],X]],[[[[Z,V],V],Z]]),
@@ -59,16 +59,16 @@ test_queries_on_builtins :-
     \+ compound([]),
     \+ compound(3.14159269),
     \+ compound(3),
-    \+ compound("sdfsa"),
+    compound("sdfsa"),
     \+ compound(atom),
-    \+ string(functor(string)),
-    \+ string(3.14159269),
-    \+ string(3),
-    \+ string(f(X)),
-    string("sdfsa"),
-    \+ string(atom),
-    \+ string([1,2,3]),
-    \+ string([1,2,X]),
+    \+ partial_string(functor(partial_string)),
+    \+ partial_string(3.14159269),
+    \+ partial_string(3),
+    \+ partial_string(f(X)),
+    partial_string("sdfsa"),
+    \+ partial_string(atom),
+    \+ partial_string([1,2,3]),
+    \+ partial_string([1,2,X]),
     \+ \+ ( X = nonvar, nonvar(X) ),
     \+ nonvar(X),
     \+ \+ nonvar(f(X)),
@@ -97,10 +97,10 @@ test_queries_on_builtins :-
     \+ (X @>= Y),
     \+ (X @> Y),
     \+ \+ (X @>= X),
-    \+ (atom @=< "string"),
+    atom @=< "string",
     \+ \+ (atom @=< atom),
     \+ (atom @=< aaa),
-    \+ \+ (atom @>= "string"),
+    \+ \+ (atom @=< "string"),
     \+ \+ (X is 3 + 3,X @>= Y),
     \+ \+ (f(X) @>= f(X)),
     \+ \+ (f(X) @>= a),
@@ -109,12 +109,12 @@ test_queries_on_builtins :-
     \+ ([1,2,3] @=< [1,2]),
     \+ \+ ([] @=< [1,2]),
     \+ ([] @< 1),
-    \+ ([] @< "string"),
-    \+ ([] @< atom),
-    atom @< [],
+    [] @< "string",
+    [] @< atom,
+    \+ atom @< [],
     1.1 @< 1,
     1.0 @=< 1,
-    1 @=< 1.0,
+    \+ 1 @=< 1.0,
     \+ \+ (variant(X, Y)),
     \+ (variant(f(X), f(x))),
     \+ \+ (variant(X, X)),
index 29e72cd83e75440a0613b2254a02610a9fd6256b..9a15a9f3409ae70687f8cf3300b71ed6f6d8c163 100644 (file)
@@ -48,7 +48,7 @@ test_queries_on_rules :-
     \+ \+ retract((p(f(f(a), g(b), X), g(b), h) :- q(X, _))),
     \+ \+ assertz((p(_, f(_, Y, _)) :- h(Y))),
     assertz(h(y)),
-    \+ \+ findall(Y, p(_, f(_, Y, _)), [y]).
+    \+ \+ findall(Y, p(_, f(_, Y, _)), [y]),
     p(_, f(_, y, _)),
     \+ p(_, f(_, z, _)),
     \+ \+ retract((p(_, f(_, Y, _)) :- h(Y))),