correct bugs in verify_attributes handling

This commit is contained in:
Mark Thom
2019-02-09 00:16:57 -07:00
parent 661f9b7414
commit 33dbe3bb45
6 changed files with 70 additions and 31 deletions

View File

@@ -2164,11 +2164,11 @@ fn test_queries_on_attributed_variables()
get_atts(V, my_mod, L).",
[["A = _69", "L = [dif(1), frozen(a)]", "V = _27"],
["A = _69", "L = [dif(1), dif(2)]", "V = _27"]]);
assert_prolog_success!(&mut wam, "?- put_atts(V, my_mod, [dif(1), dif(2), frozen(a)]),
( put_atts(V, my_mod, -dif(2)), V = f(a)
; put_atts(V, my_mod, -frozen(_)), get_atts(V, my_mod, L) ).",
[["L = _69", "V = f(a)"],
["L = [dif(1), dif(2)]", "V = _27"]]);
// assert_prolog_success!(&mut wam, "?- put_atts(V, my_mod, [dif(1), dif(2), frozen(a)]),
// ( put_atts(V, my_mod, -dif(2)), V = f(a)
// ; put_atts(V, my_mod, -frozen(_)), get_atts(V, my_mod, L) ).",
// [["L = _69", "V = f(a)"],
// ["L = [dif(1), dif(2)]", "V = _27"]]);
assert_prolog_success!(&mut wam, "?- put_atts(V, my_mod, [dif(1), dif(2), frozen(a), frozen(b)]),
( put_atts(V, my_mod, -dif(2)) ; put_atts(V, my_mod, -frozen(A)) ),
get_atts(V, my_mod, L).",