Skip to content

Commit

Permalink
Add test example
Browse files Browse the repository at this point in the history
  • Loading branch information
evenorog committed Dec 12, 2023
1 parent 70bd7c4 commit f6b6e49
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "Swift",
"image": "swift:5.9",
"image": "swift:latest",
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": "false",
"username": "dev"
}
},
"ghcr.io/swift-server-community/swift-devcontainer-features/swift-format:0": {}
},
"runArgs": [
"--cap-add=SYS_PTRACE",
Expand Down
19 changes: 12 additions & 7 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,16 @@
import PackageDescription

let package = Package(
name: "swift-with-devcontainer",
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.
.executableTarget(
name: "swift-with-devcontainer"),
]
name: "swift-with-devcontainer",
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.
.executableTarget(
name: "swift-with-devcontainer"
),
.testTarget(
name: "swift-with-devcontainerTests",
dependencies: ["swift-with-devcontainer"]
),
]
)
7 changes: 7 additions & 0 deletions Tests/example.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import XCTest

class ExampleTests: XCTestCase {
func testAdd() {
XCTAssertEqual(1 + 1, 2)
}
}

0 comments on commit f6b6e49

Please sign in to comment.