diff --git a/Tests/DatadogSDKTesting/Utils/FileLocatorTests.swift b/Tests/DatadogSDKTesting/Utils/FileLocatorTests.swift index 7f0bb4a..f9d4a3b 100644 --- a/Tests/DatadogSDKTesting/Utils/FileLocatorTests.swift +++ b/Tests/DatadogSDKTesting/Utils/FileLocatorTests.swift @@ -9,15 +9,19 @@ import Foundation import XCTest internal class FileLocatorTests: XCTestCase { - func testThisTestLocation() { + func testThisTestLocation() throws { let testName = "FileLocatorTests.testThisTestLocation" let bundleName = Bundle(for: FileLocatorTests.self).bundleURL.deletingPathExtension().lastPathComponent + + try FileManager.default.createDirectory(at: DDSymbolicator.dsymFilesDir.url, + withIntermediateDirectories: true) + DDSymbolicator.createDSYMFileIfNeeded(forImageName: bundleName) let bundleFunctionInfo = FileLocator.testFunctionsInModule(bundleName) let functionInfo = bundleFunctionInfo[testName] XCTAssertEqual(#file, functionInfo?.file) XCTAssertEqual(12, functionInfo?.startLine) - XCTAssertEqual(22, functionInfo?.endLine) + XCTAssertEqual(26, functionInfo?.endLine) } }