move print_constant logic to heap_print.rs

This commit is contained in:
Mark Thom
2018-07-16 19:06:27 -06:00
parent f5e254dd64
commit c5e1a08214
5 changed files with 50 additions and 30 deletions

View File

@@ -1607,7 +1607,7 @@ fn test_queries_on_setup_call_cleanup()
assert_prolog_failure!(&mut wam,
"?- setup_call_cleanup(S=1,(G=2;G=3), writeq(S+G>B)), B=4, !, throw(x).");
assert_prolog_success!(&mut wam,
"?- setup_call_cleanup(true, (X=1;X=2), writeq(a)), setup_call_cleanup(true,(Y=1;Y=2),writeq(b)), !.",
"?- setup_call_cleanup(true, (X=1;X=2), writeq(a)), setup_call_cleanup(true,(Y=1;Y=2),writeq(b)), !.",
[["Y = 1", "X = 1"]]);
assert_prolog_success!(&mut wam, "?- catch(setup_call_cleanup(true,throw(goal),throw(cl)), Pat, true).",
[["Pat = goal"]]);