@@ -35,7 +35,7 @@ class SwiftNinjaTests: XCTestCase {
3535 let manifest = try NinjaManifest (
3636 path: manifestFile,
3737 workingDirectory: URL ( fileURLWithPath: manifestFile)
38- . deletingLastPathComponent ( ) . path )
38+ . deletingLastPathComponent ( ) . withUnsafeFileSystemRepresentation { try XCTUnwrap ( $0 . map ( String . init ( cString : ) ) ) } )
3939
4040 let expectedRule = NinjaRule (
4141 name: " CMD " , variables: [ " command " : " ls $in $out $statementvar " ,
@@ -60,7 +60,7 @@ class SwiftNinjaTests: XCTestCase {
6060 ] )
6161 }
6262
63- func testMissingRule( ) {
63+ func testMissingRule( ) throws {
6464 let manifestFile = makeTemporaryFile ( """
6565 build output: CMD input \n
6666 """ )
@@ -79,18 +79,18 @@ class SwiftNinjaTests: XCTestCase {
7979 XCTAssertThrowsError ( try NinjaManifest (
8080 path: manifestFile,
8181 workingDirectory: URL ( fileURLWithPath: manifestFile)
82- . deletingLastPathComponent ( ) . path ) ) { error in
82+ . deletingLastPathComponent ( ) . withUnsafeFileSystemRepresentation { try XCTUnwrap ( $0 . map ( String . init ( cString : ) ) ) } ) ) { error in
8383 guard case NinjaError . invalidManifest( let errors) = error else {
8484 XCTFail ( " Load error was not a NinjaError.invalidManifest " )
8585 return
8686 }
8787 assertExpectedError ( errors)
8888 }
8989
90- let ( manifest, errors) = NinjaManifest . createNonThrowing (
90+ let ( manifest, errors) = try NinjaManifest . createNonThrowing (
9191 path: manifestFile,
9292 workingDirectory: URL ( fileURLWithPath: manifestFile)
93- . deletingLastPathComponent ( ) . path )
93+ . deletingLastPathComponent ( ) . withUnsafeFileSystemRepresentation { try XCTUnwrap ( $0 . map ( String . init ( cString : ) ) ) } )
9494
9595 XCTAssertNil ( manifest. rules [ " CMD " ] )
9696 XCTAssertEqual ( manifest. statements, [
0 commit comments