Basic package setup #1
@ -3,21 +3,34 @@
|
||||
import PackageDescription
|
||||
|
||||
let package = Package(
|
||||
name: "amiibo-api",
|
||||
name: AmiiboAPI.package,
|
||||
products: [
|
||||
// Products define the executables and libraries a package produces, making them visible to other packages.
|
||||
.library(
|
||||
name: "amiibo-api",
|
||||
targets: ["amiibo-api"]),
|
||||
name: AmiiboAPI.package,
|
||||
targets: [
|
||||
AmiiboAPI.target
|
||||
]
|
||||
)
|
||||
],
|
||||
targets: [
|
||||
// Targets are the basic building blocks of a package, defining a module or a test suite.
|
||||
// Targets can depend on other targets in this package and products from dependencies.
|
||||
.target(
|
||||
name: "amiibo-api"),
|
||||
name: AmiiboAPI.target,
|
||||
path: "Sources"
|
||||
),
|
||||
.testTarget(
|
||||
name: "amiibo-apiTests",
|
||||
dependencies: ["amiibo-api"]
|
||||
name: AmiiboAPI.test,
|
||||
dependencies: [
|
||||
.byName(name: AmiiboAPI.target)
|
||||
],
|
||||
path: "Tests"
|
||||
),
|
||||
]
|
||||
)
|
||||
|
||||
// MARK: - Constants
|
||||
|
||||
enum AmiiboAPI {
|
||||
static let package = "amiibo-api"
|
||||
static let target = "AmiiboAPI"
|
||||
static let test = "\(AmiiboAPI.target)Tests"
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
import Testing
|
||||
@testable import amiibo_api
|
||||
|
||||
@testable import AmiiboAPI
|
||||
|
||||
@Test func example() async throws {
|
||||
// Write your test here and use APIs like `#expect(...)` to check expected conditions.
|
Loading…
x
Reference in New Issue
Block a user