Skip to content

Commit

Permalink
expand test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
christo committed Dec 18, 2024
1 parent ba7818b commit d150dae
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions client/test/machine/mos6502.test.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import {expect} from 'chai';
import {Mos6502} from '../../src/machine/mos6502'

describe("Mos6502", () => {
it("returns instruction by opcode name", ()=>{
describe("Mos6502 implied mode opcodes", () => {
it("returns NOP name", ()=>{
expect(Mos6502.ISA.byName("NOP").getBytes()).to.eql([0xea]);
});
it("returns PHA name", ()=>{
expect(Mos6502.ISA.byName("PHA").getBytes()).to.eql([0x48]);
});
it("returns INX name", ()=>{
expect(Mos6502.ISA.byName("INX").getBytes()).to.eql([0xe8]);
});
});

0 comments on commit d150dae

Please sign in to comment.