fix tests

This commit is contained in:
Mark Thom
2018-10-24 23:16:49 -06:00
parent 69a7579adb
commit a4e882756e
5 changed files with 9 additions and 3 deletions

2
Cargo.lock generated
View File

@@ -108,7 +108,7 @@ dependencies = [
[[package]]
name = "rusty-wam"
version = "0.7.14"
version = "0.7.15"
dependencies = [
"downcast 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"num 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",

View File

@@ -1,6 +1,6 @@
[package]
name = "rusty-wam"
version = "0.7.14"
version = "0.7.15"
authors = ["Mark Thom <markjordanthom@gmail.com>"]
repository = "https://github.com/mthom/rusty-wam"
description = "The Warren Abstract Machine in Rust."

View File

@@ -132,7 +132,9 @@ impl MachineState {
output.append(" = ");
let mut printer = HCPrinter::from_heap_locs(&self, output, var_dir);
printer.numbervars = false;
printer.quoted = true;
let mut output = printer.print(addr);

View File

@@ -126,6 +126,10 @@ impl MachineState {
} else {
let mut output = {
let mut printer = HCPrinter::new(&self, PrinterOutputter::new());
printer.quoted = true;
printer.numbervars = true;
printer.print(Addr::HeapCell(h))
};

View File

@@ -1871,7 +1871,7 @@ fn test_queries_on_dcgs()
submit(&mut wam, ":- use_module(library(dcgs)).");
// test case by YeGoblynQueene on hacker news.
// test case by YeGoblynQueene from hacker news.
compile_user_module(&mut wam,
" ability(destroy, X) --> destroy(X).
destroy(X) --> [destroy], target(X).