add tests for builtins

This commit is contained in:
Mark Thom
2018-01-25 21:01:23 -07:00
parent 700f031cd9
commit d240eaca78
3 changed files with 76 additions and 7 deletions

View File

@@ -1516,7 +1516,12 @@ impl MachineState {
}
};
self.heap.push(HeapCellValue::NamedStr(arity, name, None));
if arity > 0 {
self.heap.push(HeapCellValue::NamedStr(arity, name, None));
} else {
let c = Constant::Atom(name.clone());
self.heap.push(HeapCellValue::Addr(Addr::Con(c)));
}
for _ in 0 .. arity {
let h = self.heap.h;