Skip to content

Commit 75df1cc

Browse files
committed
Test: Merge IntegrationTests into Tests
Consolidate all the tests into a single folders. This change only moves the IntegrationTests/Sources and IntegrationTests/Tests to their respective directory. In addition, update the IntegratioNTests to call the respective `executeSwift*()` function and remove its dependency, as much as possible, on Swift Tools Support Core in favor our the `Basics` module. A subsequent change will find better homes for the tests under Tests/IntegrationTests.
1 parent 86810fe commit 75df1cc

File tree

68 files changed

+991
-1299
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+991
-1299
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// swift-tools-version:5.3
2+
import PackageDescription
3+
4+
let package = Package(
5+
name: "AwesomeResources",
6+
targets: [
7+
.target(name: "AwesomeResources", resources: [.copy("hello.txt")]),
8+
.testTarget(name: "AwesomeResourcesTest", dependencies: ["AwesomeResources"], resources: [.copy("world.txt")])
9+
]
10+
)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import Foundation
2+
3+
public struct AwesomeResource {
4+
public init() {}
5+
public let hello = try! String(contentsOf: Bundle.module.url(forResource: "hello", withExtension: "txt")!)
6+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hello
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import XCTest
2+
import Foundation
3+
import AwesomeResources
4+
5+
final class MyTests: XCTestCase {
6+
func testFoo() {
7+
XCTAssertTrue(AwesomeResource().hello == "hello")
8+
}
9+
func testBar() {
10+
let world = try! String(contentsOf: Bundle.module.url(forResource: "world", withExtension: "txt")!)
11+
XCTAssertTrue(world == "world")
12+
}
13+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
world

IntegrationTests/Package.swift

Lines changed: 0 additions & 35 deletions
This file was deleted.

IntegrationTests/README.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)