From ba559d6cb087b219e3644516dd4443d8ec6d55cb Mon Sep 17 00:00:00 2001 From: Ron Pinz Date: Sun, 4 Nov 2018 09:07:05 -0500 Subject: [PATCH] fix tests, add missing tests to LinuxMain.swift --- Tests/DBusTests/InterfaceTests.swift | 6 +++--- Tests/DBusTests/MessageTests.swift | 12 ++++++------ Tests/DBusTests/ObjectPathTests.swift | 10 +++++----- Tests/DBusTests/SignatureTests.swift | 6 +++--- Tests/LinuxMain.swift | 3 +++ 5 files changed, 20 insertions(+), 17 deletions(-) diff --git a/Tests/DBusTests/InterfaceTests.swift b/Tests/DBusTests/InterfaceTests.swift index ee8f2f1..55fc4d4 100644 --- a/Tests/DBusTests/InterfaceTests.swift +++ b/Tests/DBusTests/InterfaceTests.swift @@ -11,9 +11,9 @@ import XCTest final class InterfaceTests: XCTestCase { - static let allTests = [ - (testInvalid, "testInvalid"), - (testValid, "testValid") + static let allTests: [(String, (InterfaceTests) -> () -> Void)] = [ + ("testInvalid", testInvalid), + ("testValid", testValid) ] func testInvalid() { diff --git a/Tests/DBusTests/MessageTests.swift b/Tests/DBusTests/MessageTests.swift index 4defd37..2c4a49c 100644 --- a/Tests/DBusTests/MessageTests.swift +++ b/Tests/DBusTests/MessageTests.swift @@ -11,11 +11,11 @@ import XCTest final class MessageTests: XCTestCase { - static let allTests = [ - (testBasicValueArguments, "testBasicValueArguments"), - (testArrayArguments, "testArrayArguments"), - (testStructureArguments, "testStructureArguments"), - (testErrorMessage, "testErrorMessage") + static let allTests: [(String, (MessageTests) -> () -> Void)] = [ + ("testBasicValueArguments", testBasicValueArguments), + ("testArrayArguments", testArrayArguments), + ("testStructureArguments", testStructureArguments), + ("testErrorMessage", testErrorMessage) ] func testBasicValueArguments() { @@ -31,7 +31,7 @@ final class MessageTests: XCTestCase { .uint64(.max), .string("Test String"), .objectPath(DBusObjectPath("/com/example/bus1")), - .signature(DBusSignature("a{s(ai)}")) + .signature(DBusSignature("a{s(ai)}")), ] do { diff --git a/Tests/DBusTests/ObjectPathTests.swift b/Tests/DBusTests/ObjectPathTests.swift index d1c9021..4b6457c 100644 --- a/Tests/DBusTests/ObjectPathTests.swift +++ b/Tests/DBusTests/ObjectPathTests.swift @@ -11,11 +11,11 @@ import XCTest final class ObjectPathTests: XCTestCase { - static let allTests = [ - (testInvalid, "testInvalid"), - (testValid, "testValid"), - (testEmpty, "testEmpty"), - (testMultithread, "testMultithread") + static let allTests: [(String, (ObjectPathTests) -> () -> Void)] = [ + ("testInvalid", testInvalid), + ("testValid", testValid), + ("testEmpty", testEmpty), + ("testMultithread", testMultithread) ] func testInvalid() { diff --git a/Tests/DBusTests/SignatureTests.swift b/Tests/DBusTests/SignatureTests.swift index f4e4007..ab0d26c 100644 --- a/Tests/DBusTests/SignatureTests.swift +++ b/Tests/DBusTests/SignatureTests.swift @@ -11,9 +11,9 @@ import XCTest final class SignatureTests: XCTestCase { - static let allTests = [ - (testInvalid, "testInvalid"), - (testValid, "testValid") + static let allTests: [(String, (SignatureTests) -> () -> Void)] = [ + ("testInvalid", testInvalid), + ("testValid", testValid) ] func testInvalid() { diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift index 32c7c17..3118593 100755 --- a/Tests/LinuxMain.swift +++ b/Tests/LinuxMain.swift @@ -2,5 +2,8 @@ import XCTest @testable import DBusTests XCTMain([ + testCase(InterfaceTests.allTests), + testCase(MessageTests.allTests), testCase(ObjectPathTests.allTests), + testCase(SignatureTests.allTests) ])