diff --git a/KalmanFilter.xcodeproj/project.pbxproj b/KalmanFilter.xcodeproj/project.pbxproj index 2ba1ffe..6399de8 100644 --- a/KalmanFilter.xcodeproj/project.pbxproj +++ b/KalmanFilter.xcodeproj/project.pbxproj @@ -62,10 +62,18 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - CEF0076E1D650AEE0084F081 = { + B34A80E62637A27B00E320E4 /* Sources */ = { isa = PBXGroup; children = ( CEF0077A1D650AEE0084F081 /* KalmanFilter */, + ); + path = Sources; + sourceTree = ""; + }; + CEF0076E1D650AEE0084F081 = { + isa = PBXGroup; + children = ( + B34A80E62637A27B00E320E4 /* Sources */, CEF007861D650AEE0084F081 /* KalmanFilterTests */, CEF007791D650AEE0084F081 /* Products */, ); @@ -179,6 +187,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = CEF0076E1D650AEE0084F081; @@ -360,7 +369,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = KalmanFilter/Info.plist; + INFOPLIST_FILE = Sources/KalmanFilter/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -383,7 +392,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = KalmanFilter/Info.plist; + INFOPLIST_FILE = Sources/KalmanFilter/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; diff --git a/KalmanFilter.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/KalmanFilter.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/KalmanFilter.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/KalmanFilter.xcodeproj/project.xcworkspace/xcuserdata/dechengma.xcuserdatad/UserInterfaceState.xcuserstate b/KalmanFilter.xcodeproj/project.xcworkspace/xcuserdata/dechengma.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..b6a78ba Binary files /dev/null and b/KalmanFilter.xcodeproj/project.xcworkspace/xcuserdata/dechengma.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..41b6bb4 --- /dev/null +++ b/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version:5.3 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "KalmanFilter", + products: [ + // Products define the executables and libraries a package produces, and make them visible to other packages. + .library( + name: "KalmanFilter", + targets: ["KalmanFilter"]), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + // .package(url: /* package url */, from: "1.0.0"), + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages this package depends on. + .target( + name: "KalmanFilter", + dependencies: []), + .testTarget( + name: "KalmanFilterTests", + dependencies: ["KalmanFilter"]), + ] +) diff --git a/Sources/.DS_Store b/Sources/.DS_Store new file mode 100644 index 0000000..1e32086 Binary files /dev/null and b/Sources/.DS_Store differ diff --git a/KalmanFilter/DoubleExtension.swift b/Sources/KalmanFilter/DoubleExtension.swift similarity index 100% rename from KalmanFilter/DoubleExtension.swift rename to Sources/KalmanFilter/DoubleExtension.swift diff --git a/KalmanFilter/Info.plist b/Sources/KalmanFilter/Info.plist similarity index 100% rename from KalmanFilter/Info.plist rename to Sources/KalmanFilter/Info.plist diff --git a/KalmanFilter/KalmanFilter.h b/Sources/KalmanFilter/KalmanFilter.h similarity index 100% rename from KalmanFilter/KalmanFilter.h rename to Sources/KalmanFilter/KalmanFilter.h diff --git a/KalmanFilter/KalmanFilter.swift b/Sources/KalmanFilter/KalmanFilter.swift similarity index 100% rename from KalmanFilter/KalmanFilter.swift rename to Sources/KalmanFilter/KalmanFilter.swift diff --git a/KalmanFilter/KalmanFilterType.swift b/Sources/KalmanFilter/KalmanFilterType.swift similarity index 100% rename from KalmanFilter/KalmanFilterType.swift rename to Sources/KalmanFilter/KalmanFilterType.swift diff --git a/KalmanFilter/Matrix.swift b/Sources/KalmanFilter/Matrix.swift similarity index 100% rename from KalmanFilter/Matrix.swift rename to Sources/KalmanFilter/Matrix.swift diff --git a/Tests/KalmanFilterTests/KalmanFilterTests.swift b/Tests/KalmanFilterTests/KalmanFilterTests.swift new file mode 100644 index 0000000..e321c7d --- /dev/null +++ b/Tests/KalmanFilterTests/KalmanFilterTests.swift @@ -0,0 +1,15 @@ +import XCTest +@testable import KalmanFilter + +final class KalmanFilterTests: XCTestCase { + func testExample() { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct + // results. + XCTAssertEqual(KalmanFilter().text, "Hello, World!") + } + + static var allTests = [ + ("testExample", testExample), + ] +} diff --git a/Tests/KalmanFilterTests/XCTestManifests.swift b/Tests/KalmanFilterTests/XCTestManifests.swift new file mode 100644 index 0000000..bb6fd96 --- /dev/null +++ b/Tests/KalmanFilterTests/XCTestManifests.swift @@ -0,0 +1,9 @@ +import XCTest + +#if !canImport(ObjectiveC) +public func allTests() -> [XCTestCaseEntry] { + return [ + testCase(KalmanFilterTests.allTests), + ] +} +#endif diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift new file mode 100644 index 0000000..6f78afc --- /dev/null +++ b/Tests/LinuxMain.swift @@ -0,0 +1,7 @@ +import XCTest + +import KalmanFilterTests + +var tests = [XCTestCaseEntry]() +tests += KalmanFilterTests.allTests() +XCTMain(tests)