From 84472fab7859c9be181dfc38d1f088f74a3070fe Mon Sep 17 00:00:00 2001 From: Preston Skupinski Date: Thu, 29 Dec 2011 00:17:29 -0500 Subject: [PATCH] use read_byte_long rather than directly accessing bytes in the memory array in the tests --- test/tests.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/tests.js b/test/tests.js index 0b63c68..3270099 100644 --- a/test/tests.js +++ b/test/tests.js @@ -1148,18 +1148,18 @@ function test_cpu_load_binary() { test("Make sure that load binary can work with hex strings", function() { var cpu = new CPU_65816(); cpu.load_binary("18fb", 0x8000); - equal(cpu.mmu.memory[cpu.r.k][0x8000], 0x18, + equal(cpu.mmu.read_byte_long(0x8000, cpu.r.k), 0x18, "$8000 should equal 0x18"); - equal(cpu.mmu.memory[cpu.r.k][0x8001], 0xfb, + equal(cpu.mmu.read_byte_long(0x8001, cpu.r.k), 0xfb, "$8001 should equal 0xfb"); }); test("Make sure that load_binary can work with arrays", function() { var cpu = new CPU_65816(); cpu.load_binary([0x18, 0xfb], 0x8000); - equal(cpu.mmu.memory[cpu.r.k][0x8000], 0x18, + equal(cpu.mmu.read_byte_long(0x8000, cpu.r.k), 0x18, "$8000 should equal 0x18"); - equal(cpu.mmu.memory[cpu.r.k][0x8001], 0xfb, + equal(cpu.mmu.read_byte_long(0x8001, cpu.r.k), 0xfb, "$8001 should equal 0xfb"); }); }