fix tests
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@@ -108,7 +108,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rusty-wam"
|
name = "rusty-wam"
|
||||||
version = "0.7.14"
|
version = "0.7.15"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"downcast 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"num 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "rusty-wam"
|
name = "rusty-wam"
|
||||||
version = "0.7.14"
|
version = "0.7.15"
|
||||||
authors = ["Mark Thom <markjordanthom@gmail.com>"]
|
authors = ["Mark Thom <markjordanthom@gmail.com>"]
|
||||||
repository = "https://github.com/mthom/rusty-wam"
|
repository = "https://github.com/mthom/rusty-wam"
|
||||||
description = "The Warren Abstract Machine in Rust."
|
description = "The Warren Abstract Machine in Rust."
|
||||||
|
|||||||
@@ -132,7 +132,9 @@ impl MachineState {
|
|||||||
output.append(" = ");
|
output.append(" = ");
|
||||||
|
|
||||||
let mut printer = HCPrinter::from_heap_locs(&self, output, var_dir);
|
let mut printer = HCPrinter::from_heap_locs(&self, output, var_dir);
|
||||||
|
|
||||||
printer.numbervars = false;
|
printer.numbervars = false;
|
||||||
|
printer.quoted = true;
|
||||||
|
|
||||||
let mut output = printer.print(addr);
|
let mut output = printer.print(addr);
|
||||||
|
|
||||||
|
|||||||
@@ -126,6 +126,10 @@ impl MachineState {
|
|||||||
} else {
|
} else {
|
||||||
let mut output = {
|
let mut output = {
|
||||||
let mut printer = HCPrinter::new(&self, PrinterOutputter::new());
|
let mut printer = HCPrinter::new(&self, PrinterOutputter::new());
|
||||||
|
|
||||||
|
printer.quoted = true;
|
||||||
|
printer.numbervars = true;
|
||||||
|
|
||||||
printer.print(Addr::HeapCell(h))
|
printer.print(Addr::HeapCell(h))
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1871,7 +1871,7 @@ fn test_queries_on_dcgs()
|
|||||||
|
|
||||||
submit(&mut wam, ":- use_module(library(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,
|
compile_user_module(&mut wam,
|
||||||
" ability(destroy, X) --> destroy(X).
|
" ability(destroy, X) --> destroy(X).
|
||||||
destroy(X) --> [destroy], target(X).
|
destroy(X) --> [destroy], target(X).
|
||||||
|
|||||||
Reference in New Issue
Block a user