Skip to content

Commit c8da0e3

Browse files
committed
Extend unit test to contain a non-main source file (currently triggers failure)
1 parent c0abd67 commit c8da0e3

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
public func GetOtherString() -> String {
2+
return "Other"
3+
}

Fixtures/Miscellaneous/ExeTest/Tests/ExeTests/ExeTests.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ final class ExeTestTests: XCTestCase {
66
func testExample() throws {
77
// This is an example of a test case that tries to imports an executable target.
88
XCTAssertEqual(Exe.GetGreeting(), "Hello")
9+
XCTAssertEqual(Exe.GetOtherString(), "Hello")
910
}
1011

1112
static var allTests = [

Tests/FunctionalTests/MiscellaneousTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ class MiscellaneousTestCase: XCTestCase {
523523
XCTAssertMatch(stdout, .contains("Eliding symbols from Exe_main.swift.o"))
524524
XCTAssertMatch(stdout, .contains("Linking ExeTestPackageTests"))
525525
} catch {
526-
XCTFail()
526+
XCTFail("\(error)")
527527
}
528528
}
529529
}

0 commit comments

Comments
 (0)