1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-27 01:31:42 +00:00

Merge branch 'AppleIIgs' of github.com:TomHarte/CLK into AppleIIgs

This commit is contained in:
Thomas Harte 2020-11-07 22:03:31 -05:00
commit d27fb5f199

View File

@ -20,19 +20,15 @@ class Krom65816Tests: XCTestCase {
// MARK: - Test Runner
func runTest(_ name: String) {
runTest(name, pcLimit: nil)
}
func runTest(_ name: String, pcLimit: UInt32?) {
func runTest(_ name: String, pcLimit: UInt32? = nil) {
var testData: Data?
if let filename = Bundle(for: type(of: self)).path(forResource: name, ofType: "sfc") {
testData = try? Data(contentsOf: URL(fileURLWithPath: filename))
if let filename = Bundle(for: type(of: self)).url(forResource: name, withExtension: "sfc") {
testData = try? Data(contentsOf: filename)
}
var testOutput: String?
if let filename = Bundle(for: type(of: self)).path(forResource: name + "-trace_compare", ofType: "log") {
testOutput = try? String(contentsOf: URL(fileURLWithPath: filename))
if let filename = Bundle(for: type(of: self)).url(forResource: name + "-trace_compare", withExtension: "log") {
testOutput = try? String(contentsOf: filename)
}
XCTAssertNotNil(testData)