1
0
mirror of https://github.com/rkujawa/rk65c02.git synced 2025-01-10 18:29:53 +00:00

Add instruction stepping test.

That was written some time ago but forgot to plug it into test suite.
This commit is contained in:
Radosław Kujawa 2017-02-06 22:05:16 +01:00
parent 15c864a339
commit 442c8dc3df
3 changed files with 7 additions and 3 deletions

View File

@ -5,4 +5,5 @@ test_suite('rk65c02-tests')
atf_test_program{name='test_bus'}
atf_test_program{name='test_emulation'}
atf_test_program{name='test_assemble'}
atf_test_program{name='test_stepping'}

View File

@ -5,13 +5,13 @@ VASM=vasm6502_std
VASMFLAGS=-Fbin -c02
UTILS=utils.o
TESTS=test_bus test_emulation test_stepping test_assemble
TESTS=test_bus test_emulation test_stepping test_assemble test_interrupt
TESTROMS:=$(addsuffix .rom,$(basename $(wildcard *.s)))
all : $(TESTS) $(TESTROMS)
test_stepping : test_stepping.o $(UTILS) $(RK6502LIB)
$(CC) -o $@ $(LDFLAGS) $< $(RK6502LIB)
$(CC) -o $@ $(LDFLAGS) $< $(UTILS) $(RK6502LIB)
test_bus : test_bus.o $(UTILS) $(RK6502LIB)
$(CC) -o $@ $(LDFLAGS) $< $(UTILS) $(RK6502LIB)
@ -22,6 +22,9 @@ test_emulation : test_emulation.o $(UTILS) $(RK6502LIB)
test_assemble : test_assemble.o $(UTILS) $(RK6502LIB)
$(CC) -o $@ $(LDFLAGS) $< $(UTILS) $(RK6502LIB)
#test_interrupt: test_interrupt.o $(UTILS) $(RK6502LIB)
# $(CC) -o $@ $(LDFLAGS) $< $(UTILS) $(RK6502LIB)
%.rom : %.s
$(VASM) $(VASMFLAGS) -o $@ $<

View File

@ -18,7 +18,7 @@ ATF_TC_BODY(step1, tc)
e.regs.PC = ROM_LOAD_ADDR;
ATF_REQUIRE(bus_load_file(&b, ROM_LOAD_ADDR,
"test_stepping_step1.rom"));
rom_path("test_stepping_step1.rom", tc)));
rk65c02_step(&e, 1);
ATF_CHECK(e.regs.PC == ROM_LOAD_ADDR+1);