start adding output checks to test

This commit is contained in:
Mark Thom
2018-01-15 23:42:09 -07:00
parent bdb7da3ccf
commit f59763da67
5 changed files with 459 additions and 28 deletions

View File

@@ -349,11 +349,9 @@ impl Machine {
}
}
pub fn heap_view<Outputter>(&self, var_dir: &HeapVarDict) -> Outputter::Output
pub fn heap_view<Outputter>(&self, var_dir: &HeapVarDict, mut output: Outputter) -> Outputter
where Outputter: HeapCellValueOutputter
{
let mut output = Outputter::new();
for (var, addr) in var_dir {
output.begin_new_var();
@@ -363,7 +361,7 @@ impl Machine {
output = self.ms.print_term(addr, TermFormatter {}, output);
}
output.result()
output
}
pub fn or_stack_is_empty(&self) -> bool {