Commit ac10f9da0df086df6531450284aa652ea03ad5b5

Lvv.me 2021-12-01T22:43:45

Add testTarget for SwiftPM Run swift test case: ``` $ swift test ```

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/Package.swift b/Package.swift
index 1ed4dd3..54a195b 100644
--- a/Package.swift
+++ b/Package.swift
@@ -28,9 +28,12 @@ let package = Package(
             sources: ["."],
             publicHeadersPath: "modulemap",
             cSettings: [
-                .headerSearchPath("."),
                 .unsafeFlags(["-flto=thin"])  // for Dead Code Elimination
-            ])
+            ]),
+        .testTarget(name: "TommathTests",
+                    dependencies: ["libtommath"],
+                    path: "demo",
+                    sources: ["tommath_tests.swift"])
     ],
     cLanguageStandard: .gnu11,
     cxxLanguageStandard: .gnucxx14