Skip to content

Commit abdb0a0

Browse files
committed
Add failure message to assert in testSystemModuleInterface
This helps us debug if the test fails in CI.
1 parent 0a50674 commit abdb0a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tests/SourceKitLSPTests/SwiftInterfaceTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ final class SwiftInterfaceTests: XCTestCase {
7979
XCTAssertTrue(location.uri.pseudoPath.hasSuffix("/Foundation.swiftinterface"))
8080
let fileContents = try XCTUnwrap(location.uri.fileURL.flatMap({ try String(contentsOf: $0, encoding: .utf8) }))
8181
// Sanity-check that the generated Swift Interface contains Swift code
82-
XCTAssertTrue(fileContents.hasPrefix("import "))
82+
XCTAssert(fileContents.hasPrefix("import "), "Expected that the foundation swift interface starts with 'import ' but got '\(fileContents.prefix(100))'")
8383
}
8484

8585
func testOpenInterface() throws {

0 commit comments

Comments
 (0)