maxep 5 سال پیش
والد
کامیت
da3b9434a6

+ 1 - 0
.github/workflows/main.yml

@@ -13,6 +13,7 @@ jobs:
 
     steps:
     - uses: actions/checkout@v2
+    - uses: fwal/setup-swift@v1
     - name: Build
       run: swift build
     - name: Run tests

+ 6 - 1
Package.swift

@@ -1,4 +1,4 @@
-// swift-tools-version:5.3
+// swift-tools-version:5.4
 // The swift-tools-version declares the minimum version of Swift required to build this package.
 
 import PackageDescription
@@ -81,6 +81,11 @@ let package = Package(
             dependencies: ["Binary"],
             exclude: ["LICENSE"]
         ),
+        .testTarget(
+            name: "GzipTests",
+            dependencies: ["Gzip"],
+            resources: [.process("Resources")]
+        ),
 
         .target(
             name: "XML",

+ 0 - 4
Tests/BinaryTests/BinaryTests.swift

@@ -4,8 +4,4 @@ import XCTest
 final class BinaryTests: XCTestCase {
 
     func testExample() {}
-
-    static var allTests = [
-        ("testExample", testExample),
-    ]
 }

+ 0 - 9
Tests/BinaryTests/XCTestManifests.swift

@@ -1,9 +0,0 @@
-import XCTest
-
-#if !canImport(ObjectiveC)
-public func allTests() -> [XCTestCaseEntry] {
-    return [
-        testCase(BinaryTests.allTests),
-    ]
-}
-#endif

+ 0 - 4
Tests/CryptoTests/Chacha20Tests.swift

@@ -241,8 +241,4 @@ class Chacha20Tests: XCTestCase {
             }
         }
     }
-
-    static var allTests = [
-        ("testChaCha20", testChaCha20),
-    ]
 }

+ 0 - 4
Tests/CryptoTests/Salsa20Tests.swift

@@ -240,8 +240,4 @@ class Salsa20Tests: XCTestCase {
             }
         }
     }
-
-    static var allTests = [
-        ("testSalsa20", testSalsa20),
-    ]
 }

+ 0 - 4
Tests/CryptoTests/TwofishTests.swift

@@ -330,8 +330,4 @@ class TwofishTests: XCTestCase {
 //        pt = try Twofish(key: key).decrypt(data: ct)
 //        XCTAssertEqual(pt.hexa.uppercased(), "C5A3E7CEE0F1B7260528A68FB4EA05F2", "Twofish: Decrypt Keysize=256 I=10 failed")
 //    }
-
-    // static var allTests = [
-    //     ("testSalsa20", testSalsa20),
-    // ]
 }

+ 0 - 10
Tests/CryptoTests/XCTestManifests.swift

@@ -1,10 +0,0 @@
-import XCTest
-
-#if !canImport(ObjectiveC)
-public func allTests() -> [XCTestCaseEntry] {
-    return [
-        testCase(Chacha20Tests.allTests),
-        testCase(Salsa20Tests.allTests),
-    ]
-}
-#endif

+ 0 - 6
Tests/KeePassTests/KeePassTests.swift

@@ -28,10 +28,4 @@ final class KeePassTests: XCTestCase {
         let db = try KeePass.open(contentOf: file, compositeKey: key)
         print(db)
     }
-
-    static var allTests = [
-        ("testKDB", testKDB),
-        ("testKDBX3", testKDBX3),
-        ("testKDBX4", testKDBX4),
-    ]
 }

+ 0 - 9
Tests/KeePassTests/XCTestManifests.swift

@@ -1,9 +0,0 @@
-import XCTest
-
-#if !canImport(ObjectiveC)
-public func allTests() -> [XCTestCaseEntry] {
-    return [
-        testCase(KeePassTests.allTests),
-    ]
-}
-#endif

+ 0 - 9
Tests/LinuxMain.swift

@@ -1,9 +0,0 @@
-import XCTest
-
-import KeePassTests
-
-var tests = [XCTestCaseEntry]()
-tests += KeePassTests.allTests()
-tests += CryptoTests.allTests()
-tests += BinaryTests.allTests()
-XCTMain(tests)