diff --git a/Sources/Sentry/SentryUIEventTracker.m b/Sources/Sentry/SentryUIEventTracker.m index efeb27443f8..1d041d3dd39 100644 --- a/Sources/Sentry/SentryUIEventTracker.m +++ b/Sources/Sentry/SentryUIEventTracker.m @@ -169,13 +169,13 @@ - (NSString *)getOperation:(id)sender */ - (NSString *)getTransactionName:(NSString *)action target:(NSString *)target { - NSArray *componens = [action componentsSeparatedByString:@":"]; - if (componens.count > 2) { + NSArray *components = [action componentsSeparatedByString:@":"]; + if (components.count > 2) { NSMutableString *result = - [[NSMutableString alloc] initWithFormat:@"%@.%@(", target, componens.firstObject]; + [[NSMutableString alloc] initWithFormat:@"%@.%@(", target, components.firstObject]; - for (int i = 1; i < (componens.count - 1); i++) { - [result appendFormat:@"%@:", componens[i]]; + for (int i = 1; i < (components.count - 1); i++) { + [result appendFormat:@"%@:", components[i]]; } [result appendFormat:@")"]; @@ -183,7 +183,7 @@ - (NSString *)getTransactionName:(NSString *)action target:(NSString *)target return result; } - return [NSString stringWithFormat:@"%@.%@", target, componens.firstObject]; + return [NSString stringWithFormat:@"%@.%@", target, components.firstObject]; } NS_ASSUME_NONNULL_END diff --git a/Tests/SentryTests/Integrations/Performance/SentrySubClassFinderTests.swift b/Tests/SentryTests/Integrations/Performance/SentrySubClassFinderTests.swift index c50f3128c18..bc4340ba311 100644 --- a/Tests/SentryTests/Integrations/Performance/SentrySubClassFinderTests.swift +++ b/Tests/SentryTests/Integrations/Performance/SentrySubClassFinderTests.swift @@ -57,7 +57,7 @@ class SentrySubClassFinderTests: XCTestCase { assertActOnSubclassesOfViewController(expected: [], imageName: "OtherImage") } - func testGettingSublcasses_DoesNotCallInitializer() { + func testGettingSubclasses_DoesNotCallInitializer() { let sut = SentrySubClassFinder(dispatchQueue: TestSentryDispatchQueueWrapper(), objcRuntimeWrapper: fixture.runtimeWrapper) var actual: [AnyClass] = [] diff --git a/Tests/SentryTests/Performance/SentryTracerTests.swift b/Tests/SentryTests/Performance/SentryTracerTests.swift index 53be5bcfe32..9498f409ce2 100644 --- a/Tests/SentryTests/Performance/SentryTracerTests.swift +++ b/Tests/SentryTests/Performance/SentryTracerTests.swift @@ -751,13 +751,13 @@ class SentryTracerTests: XCTestCase { XCTAssertEqual(transactions, fixture.hub.capturedEventsWithScopes.count) - let transactionsWithAppStartMeasrurement = fixture.hub.capturedEventsWithScopes.filter { pair in + let transactionsWithAppStartMeasurement = fixture.hub.capturedEventsWithScopes.filter { pair in let serializedTransaction = pair.event.serialize() let measurements = serializedTransaction["measurements"] as? [String: [String: Int]] return measurements == ["app_start_warm": ["value": 500]] } - XCTAssertEqual(1, transactionsWithAppStartMeasrurement.count) + XCTAssertEqual(1, transactionsWithAppStartMeasurement.count) } #if os(iOS) || os(tvOS) || targetEnvironment(macCatalyst) diff --git a/Tests/SentryTests/SentryCrash/SentryCrashReportSinkTests.swift b/Tests/SentryTests/SentryCrash/SentryCrashReportSinkTests.swift index 0b213b277d1..211c841f90e 100644 --- a/Tests/SentryTests/SentryCrash/SentryCrashReportSinkTests.swift +++ b/Tests/SentryTests/SentryCrash/SentryCrashReportSinkTests.swift @@ -52,8 +52,8 @@ class SentryCrashReportSinkTests: SentrySDKIntegrationTestsBase { filterReportWithAttachment() let client = getTestClient() - XCTAssertEqual(1, client.flushInvoctions.count) - XCTAssertEqual(5, client.flushInvoctions.first) + XCTAssertEqual(1, client.flushInvocations.count) + XCTAssertEqual(5, client.flushInvocations.first) XCTAssertEqual(0, fixture.dispatchQueue.dispatchAsyncCalled) } @@ -63,8 +63,8 @@ class SentryCrashReportSinkTests: SentrySDKIntegrationTestsBase { filterReportWithAttachment() let client = getTestClient() - XCTAssertEqual(1, client.flushInvoctions.count) - XCTAssertEqual(5, client.flushInvoctions.first) + XCTAssertEqual(1, client.flushInvocations.count) + XCTAssertEqual(5, client.flushInvocations.first) XCTAssertEqual(0, fixture.dispatchQueue.dispatchAsyncCalled) } @@ -74,7 +74,7 @@ class SentryCrashReportSinkTests: SentrySDKIntegrationTestsBase { filterReportWithAttachment() let client = getTestClient() - XCTAssertEqual(0, client.flushInvoctions.count) + XCTAssertEqual(0, client.flushInvocations.count) XCTAssertEqual(1, fixture.dispatchQueue.dispatchAsyncCalled) } @@ -84,7 +84,7 @@ class SentryCrashReportSinkTests: SentrySDKIntegrationTestsBase { filterReportWithAttachment() let client = getTestClient() - XCTAssertEqual(0, client.flushInvoctions.count) + XCTAssertEqual(0, client.flushInvocations.count) XCTAssertEqual(1, fixture.dispatchQueue.dispatchAsyncCalled) } @@ -94,7 +94,7 @@ class SentryCrashReportSinkTests: SentrySDKIntegrationTestsBase { filterReportWithAttachment() let client = getTestClient() - XCTAssertEqual(0, client.flushInvoctions.count) + XCTAssertEqual(0, client.flushInvocations.count) XCTAssertEqual(1, fixture.dispatchQueue.dispatchAsyncCalled) } diff --git a/Tests/SentryTests/SentryCrash/SentryThreadInspectorTests.swift b/Tests/SentryTests/SentryCrash/SentryThreadInspectorTests.swift index fcf32564fc6..1ca14af6974 100644 --- a/Tests/SentryTests/SentryCrash/SentryThreadInspectorTests.swift +++ b/Tests/SentryTests/SentryCrash/SentryThreadInspectorTests.swift @@ -6,10 +6,10 @@ import XCTest var testMachineContextWrapper = TestMachineContextWrapper() var stacktraceBuilder = TestSentryStacktraceBuilder(crashStackEntryMapper: SentryCrashStackEntryMapper(inAppLogic: SentryInAppLogic(inAppIncludes: [], inAppExcludes: []))) - func getSut(testWithRealMachineConextWrapper: Bool = false) -> SentryThreadInspector { + func getSut(testWithRealMachineContextWrapper: Bool = false) -> SentryThreadInspector { - let machineContextWrapper = testWithRealMachineConextWrapper ? SentryCrashDefaultMachineContextWrapper() : testMachineContextWrapper as SentryCrashMachineContextWrapper - let stacktraceBuilder = testWithRealMachineConextWrapper ? SentryStacktraceBuilder(crashStackEntryMapper: SentryCrashStackEntryMapper(inAppLogic: SentryInAppLogic(inAppIncludes: [], inAppExcludes: []))) : self.stacktraceBuilder + let machineContextWrapper = testWithRealMachineContextWrapper ? SentryCrashDefaultMachineContextWrapper() : testMachineContextWrapper as SentryCrashMachineContextWrapper + let stacktraceBuilder = testWithRealMachineContextWrapper ? SentryStacktraceBuilder(crashStackEntryMapper: SentryCrashStackEntryMapper(inAppLogic: SentryInAppLogic(inAppIncludes: [], inAppExcludes: []))) : self.stacktraceBuilder return SentryThreadInspector( stacktraceBuilder: stacktraceBuilder, @@ -31,7 +31,7 @@ import XCTest } func testStacktraceHasFrames() { - let actual = fixture.getSut(testWithRealMachineConextWrapper: true).getCurrentThreads() + let actual = fixture.getSut(testWithRealMachineContextWrapper: true).getCurrentThreads() let stacktrace = actual[0].stacktrace // The stacktrace has usually more than 40 frames. Feel free to change the number if the tests are failing @@ -57,7 +57,7 @@ import XCTest let expect = expectation(description: "Read every thread") expect.expectedFulfillmentCount = 10 - let sut = self.fixture.getSut(testWithRealMachineConextWrapper: true) + let sut = self.fixture.getSut(testWithRealMachineContextWrapper: true) for _ in 0..<10 { queue.async { @@ -84,7 +84,7 @@ import XCTest } func testOnlyCurrentThreadHasStacktrace() { - let actual = fixture.getSut(testWithRealMachineConextWrapper: true).getCurrentThreads() + let actual = fixture.getSut(testWithRealMachineContextWrapper: true).getCurrentThreads() XCTAssertEqual(true, actual[0].current) XCTAssertNotNil(actual[0].stacktrace) @@ -93,7 +93,7 @@ import XCTest } func testOnlyFirstThreadIsCurrent() { - let actual = fixture.getSut(testWithRealMachineConextWrapper: true).getCurrentThreads() + let actual = fixture.getSut(testWithRealMachineContextWrapper: true).getCurrentThreads() let thread0 = actual[0] XCTAssertEqual(true, thread0.current) @@ -105,7 +105,7 @@ import XCTest } func testStacktraceOnlyForCurrentThread() { - let actual = fixture.getSut(testWithRealMachineConextWrapper: true).getCurrentThreads() + let actual = fixture.getSut(testWithRealMachineContextWrapper: true).getCurrentThreads() XCTAssertNotNil(actual[0].stacktrace) @@ -117,7 +117,7 @@ import XCTest } func testCrashedIsFalseForAllThreads() { - let actual = fixture.getSut(testWithRealMachineConextWrapper: true).getCurrentThreads() + let actual = fixture.getSut(testWithRealMachineContextWrapper: true).getCurrentThreads() let threadCount = actual.count for i in 0..() + var flushInvocations = Invocations() override func flush(timeout: TimeInterval) { - flushInvoctions.record(timeout) + flushInvocations.record(timeout) } }