Skip to content

Commit

Permalink
fixed test for file locator (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
ypopovych authored Aug 21, 2024
1 parent dcb5223 commit 177ff84
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Tests/DatadogSDKTesting/Utils/FileLocatorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit 177ff84

Please sign in to comment.