diff options
Diffstat (limited to 'src/vm/instruction.test.js')
-rw-r--r-- | src/vm/instruction.test.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/vm/instruction.test.js b/src/vm/instruction.test.js new file mode 100644 index 0000000..5dc7eea --- /dev/null +++ b/src/vm/instruction.test.js @@ -0,0 +1,15 @@ +'use strict'; + +const { Core } = require('./core.js'); +const { DAT } = require('./instruction.js'); + + +const CORESIZE = 8000; + + +test('DAT does nothing and kills the program', () => { + const core = new Core(CORESIZE); + const pc = 0; + const ins = core.data[pc]; + expect(DAT(core, pc, ins)).toEqual([]); +}); |