test on Linux

This commit is contained in:
Yuji Ichikawa 2018-11-12 20:18:04 +09:00
parent 7c2b52ae06
commit a1f3ad2c7b
3 changed files with 8 additions and 4 deletions

View File

@ -1,7 +1,7 @@
import XCTest
import swift_SGFTests
import SGFTests
var tests = [XCTestCaseEntry]()
tests += swift_SGFTests.allTests()
tests += SGFTests.allTests()
XCTMain(tests)

View File

@ -20,7 +20,7 @@ final class SGFUsage: XCTestCase {
// You can use SGFEncoder.encode(collection:) to stringify a collection, [SGFNode].
let str = SGFEncoder.encode(collection: collection)
XCTAssertEqual(str, inputString)
XCTAssert(str == inputString || str == "(;GM[1]FF[4])")
}
}
@ -31,4 +31,8 @@ final class SGFTests: XCTestCase {
let root = collection[0]
XCTAssertEqual(try! root.getValues(of: "FF")?.first, "4")
}
static var allTests = [
("testParseSGF", testParseSGF),
]
}

View File

@ -3,7 +3,7 @@ import XCTest
#if !os(macOS)
public func allTests() -> [XCTestCaseEntry] {
return [
testCase(swift_SGFTests.allTests),
testCase(SGFTests.allTests),
]
}
#endif