mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-28 07:29:45 +00:00
Exploit test's 65C02 abilities.
This commit is contained in:
parent
598a889c6d
commit
c160482b0a
@ -11,10 +11,10 @@ import XCTest
|
||||
|
||||
class BCDTest: XCTestCase, CSTestMachineTrapHandler {
|
||||
|
||||
func testBCD() {
|
||||
func testBCD(processor: CSTestMachine6502Processor) {
|
||||
if let filename = Bundle(for: type(of: self)).path(forResource: "BCDTEST_beeb", ofType: nil) {
|
||||
if let bcdTest = try? Data(contentsOf: URL(fileURLWithPath: filename)) {
|
||||
let machine = CSTestMachine6502(processor: .processor6502)
|
||||
let machine = CSTestMachine6502(processor: processor)
|
||||
machine.trapHandler = self
|
||||
|
||||
machine.setData(bcdTest, atAddress: 0x2900)
|
||||
@ -40,6 +40,14 @@ class BCDTest: XCTestCase, CSTestMachineTrapHandler {
|
||||
}
|
||||
}
|
||||
|
||||
func test6502BCD() {
|
||||
testBCD(processor: .processor6502)
|
||||
}
|
||||
|
||||
func test65C02BCD() {
|
||||
testBCD(processor: .processor65C02)
|
||||
}
|
||||
|
||||
private var output: String = ""
|
||||
func testMachine(_ testMachine: CSTestMachine, didTrapAtAddress address: UInt16) {
|
||||
let machine6502 = testMachine as! CSTestMachine6502
|
||||
|
Loading…
Reference in New Issue
Block a user