1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-25 03:32:01 +00:00

After hitting my head against the wall of trying to use [NS]Scanner as a parser some more, have given up and transcoded the two tests files to JSON.

This commit is contained in:
Thomas Harte 2017-05-25 18:20:13 -04:00
parent 055c860b43
commit 00cd7e7e9c
4 changed files with 85561 additions and 2 deletions

View File

@ -1,3 +1,5 @@
These files are sourced from FUSE, the For UNIX Spectrum Emulator. FUSE is GPL software, and can be found at:
tests.expected and tests.in are sourced from FUSE, the For UNIX Spectrum Emulator. FUSE is GPL software, and can be found at:
https://github.com/tom-seddon/fuse-emulator-code/tree/master/fuse/z80/tests
https://github.com/tom-seddon/fuse-emulator-code/
tests.exepected.json and tests.in.json are direct derivatives of those files and therefore are also offered under the GPL.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -153,6 +153,21 @@ class FUSETests: XCTestCase {
inputScanner.scanUpToCharacters(from: CharacterSet.newlines, into: &inputName)
outputScanner.scanUpToCharacters(from: CharacterSet.newlines, into: &outputName)
var outputBlock = ""
while true {
var nextLine: NSString?
outputScanner.scanUpTo("\n", into: &nextLine)
if let nextLine = nextLine {
print("!\(nextLine)")
outputBlock = outputBlock + " " + (nextLine as String)
if nextLine.length == 0 {
break
}
} else {
break
}
}
if let inputName = inputName, let outputName = outputName {
XCTAssertEqual(outputName, inputName)