Skip to content

Commit

Permalink
Add memory test
Browse files Browse the repository at this point in the history
  • Loading branch information
fraya committed May 8, 2024
1 parent d1722ec commit f784f55
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/brainfuck-test-suite.dylan
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
Module: brainfuck-test-suite

define test test-memory ()
let memory = make(<memory>);
memory-increment(memory, 1);
assert-equal(1, memory.memory-item);
memory-decrement(memory, 1);
assert-equal(0, memory.memory-item);
end;

//////////////////////////////////////////////////////////////////////////////
//
// Read a program
Expand Down

0 comments on commit f784f55

Please sign in to comment.