Initial Commit
This commit is contained in:
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
.DS_Store
|
||||
/.build
|
||||
/Packages
|
||||
/*.xcodeproj
|
||||
xcuserdata/
|
||||
7
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
generated
Normal file
7
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
generated
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
16
Package.resolved
Normal file
16
Package.resolved
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"object": {
|
||||
"pins": [
|
||||
{
|
||||
"package": "SwiftSerial",
|
||||
"repositoryURL": "https://github.com/yeokm1/SwiftSerial.git",
|
||||
"state": {
|
||||
"branch": null,
|
||||
"revision": "0e824cc38c6802e69543d0c1406d34babfd68e2e",
|
||||
"version": "0.1.2"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"version": 1
|
||||
}
|
||||
28
Package.swift
Normal file
28
Package.swift
Normal file
@@ -0,0 +1,28 @@
|
||||
// swift-tools-version:5.1
|
||||
// The swift-tools-version declares the minimum version of Swift required to build this package.
|
||||
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "SwiftRPLidar",
|
||||
products: [
|
||||
// Products define the executables and libraries produced by a package, and make them visible to other packages.
|
||||
.library(
|
||||
name: "SwiftRPLidar",
|
||||
targets: ["SwiftRPLidar"]),
|
||||
],
|
||||
dependencies: [
|
||||
// Dependencies declare other packages that this package depends on.
|
||||
.package(url: "https://github.com/yeokm1/SwiftSerial.git", from: "0.1.2")
|
||||
],
|
||||
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 which this package depends on.
|
||||
.target(
|
||||
name: "SwiftRPLidar",
|
||||
dependencies: [.product(name: "SwiftSerial", package: "SwiftSerial")]),
|
||||
.testTarget(
|
||||
name: "SwiftRPLidarTests",
|
||||
dependencies: ["SwiftRPLidar"]),
|
||||
]
|
||||
)
|
||||
3
Sources/SwiftRPLidar/SwiftRPLidar.swift
Normal file
3
Sources/SwiftRPLidar/SwiftRPLidar.swift
Normal file
@@ -0,0 +1,3 @@
|
||||
struct SwiftRPLidar {
|
||||
var text = "Hello, World!"
|
||||
}
|
||||
7
Tests/LinuxMain.swift
Normal file
7
Tests/LinuxMain.swift
Normal file
@@ -0,0 +1,7 @@
|
||||
import XCTest
|
||||
|
||||
import SwiftRPLidarTests
|
||||
|
||||
var tests = [XCTestCaseEntry]()
|
||||
tests += SwiftRPLidarTests.allTests()
|
||||
XCTMain(tests)
|
||||
15
Tests/SwiftRPLidarTests/SwiftRPLidarTests.swift
Normal file
15
Tests/SwiftRPLidarTests/SwiftRPLidarTests.swift
Normal file
@@ -0,0 +1,15 @@
|
||||
import XCTest
|
||||
@testable import SwiftRPLidar
|
||||
|
||||
final class SwiftRPLidarTests: 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(SwiftRPLidar().text, "Hello, World!")
|
||||
}
|
||||
|
||||
static var allTests = [
|
||||
("testExample", testExample),
|
||||
]
|
||||
}
|
||||
9
Tests/SwiftRPLidarTests/XCTestManifests.swift
Normal file
9
Tests/SwiftRPLidarTests/XCTestManifests.swift
Normal file
@@ -0,0 +1,9 @@
|
||||
import XCTest
|
||||
|
||||
#if !canImport(ObjectiveC)
|
||||
public func allTests() -> [XCTestCaseEntry] {
|
||||
return [
|
||||
testCase(SwiftRPLidarTests.allTests),
|
||||
]
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user