Skip to content

Commit

Permalink
Fixed comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
philprime committed Jan 21, 2025
1 parent 7679ef8 commit 709c090
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
### Internal

- Change macros TEST and TESTCI to SENTRY_TEST and SENTRY_TEST_CI (#4712)
- Convert constants SentryTraceOrigins to Swift (#4717)
- Convert constants SentrySpanOperation to Swift (#4718)
- Convert constants SentryTraceOrigins to Swift (#4717)

## 8.43.1-beta.0

Expand Down
2 changes: 1 addition & 1 deletion Sources/Sentry/SentryTimeToDisplayTracker.m
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ - (BOOL)startForTracer:(SentryTracer *)tracer
[SentryDependencyContainer.sharedInstance.framesTracker addListener:self];

[tracer setShouldIgnoreWaitForChildrenCallback:^(id<SentrySpan> span) {
if (span.origin == SentryTraceOrigin.autoUITimeToDisplay) {
if ([span.origin isEqualToString:SentryTraceOrigin.autoUITimeToDisplay]) {
return YES;
} else {
return NO;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -940,17 +940,17 @@ class SentryUIViewControllerPerformanceTrackerTests: XCTestCase {
XCTAssertEqual(children?.count, 6)
}

private func assertSpanDuration(span: Span?, expectedDuration: TimeInterval) throws {
let span = try XCTUnwrap(span)
let timestamp = try XCTUnwrap(span.timestamp)
let startTimestamp = try XCTUnwrap(span.startTimestamp)
private func assertSpanDuration(span: Span?, expectedDuration: TimeInterval, file: StaticString = #file, line: UInt = #line) throws {
let span = try XCTUnwrap(span, file: file, line: line)
let timestamp = try XCTUnwrap(span.timestamp, file: file, line: line)
let startTimestamp = try XCTUnwrap(span.startTimestamp, file: file, line: line)
let duration = timestamp.timeIntervalSince(startTimestamp)
XCTAssertEqual(duration, expectedDuration, accuracy: 0.001)
XCTAssertEqual(duration, expectedDuration, accuracy: 0.001, file: file, line: line)
}

private func assertTrackerIsEmpty(_ tracker: SentryPerformanceTracker) {
XCTAssertEqual(0, getStack(tracker).count)
XCTAssertEqual(0, getSpans(tracker).count)
private func assertTrackerIsEmpty(_ tracker: SentryPerformanceTracker, file: StaticString = #file, line: UInt = #line) {
XCTAssertEqual(0, getStack(tracker).count, file: file, line: line)
XCTAssertEqual(0, getSpans(tracker).count, file: file, line: line)
}

private func getStack(_ tracker: SentryPerformanceTracker) -> [Span] {
Expand Down

0 comments on commit 709c090

Please sign in to comment.