Skip to content

Commit 1e027fe

Browse files
committed
Use path(forResource
1 parent 9ebe756 commit 1e027fe

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/Tests/LR35902Tests/EndToEndTests.swift

+2-3
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,9 @@ class EndToEndTests: XCTestCase {
6363

6464
let updateGoldens = false
6565

66-
let goldensPath = try XCTUnwrap(Bundle.module.resourcePath)
67-
let goldensUrl = URL(fileURLWithPath: goldensPath).appendingPathComponent("Resources/goldens")
6866
try disassemblyFiles.forEach { key, value in
69-
let goldenUrl = goldensUrl.appendingPathComponent(key)
67+
let path = try XCTUnwrap(Bundle.module.path(forResource: key, ofType: nil, inDirectory: "Resources/goldens"))
68+
let goldenUrl = URL(fileURLWithPath: path)
7069
if updateGoldens {
7170
try value.write(to: goldenUrl, atomically: true, encoding: .utf8)
7271
print(goldenUrl)

0 commit comments

Comments
 (0)