Skip to content

Commit

Permalink
typos (#2421)
Browse files Browse the repository at this point in the history
  • Loading branch information
armcknight authored Nov 22, 2022
1 parent 45a5fea commit d10145a
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 27 deletions.
12 changes: 6 additions & 6 deletions Sources/Sentry/SentryUIEventTracker.m
Original file line number Diff line number Diff line change
Expand Up @@ -169,21 +169,21 @@ - (NSString *)getOperation:(id)sender
*/
- (NSString *)getTransactionName:(NSString *)action target:(NSString *)target
{
NSArray<NSString *> *componens = [action componentsSeparatedByString:@":"];
if (componens.count > 2) {
NSArray<NSString *> *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:@")"];

return result;
}

return [NSString stringWithFormat:@"%@.%@", target, componens.firstObject];
return [NSString stringWithFormat:@"%@.%@", target, components.firstObject];
}

NS_ASSUME_NONNULL_END
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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] = []
Expand Down
4 changes: 2 additions & 2 deletions Tests/SentryTests/Performance/SentryTracerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
14 changes: 7 additions & 7 deletions Tests/SentryTests/SentryCrash/SentryCrashReportSinkTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand All @@ -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)
}

Expand All @@ -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)
}

Expand All @@ -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)
}

Expand All @@ -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)
}

Expand Down
18 changes: 9 additions & 9 deletions Tests/SentryTests/SentryCrash/SentryThreadInspectorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand All @@ -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 {
Expand All @@ -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)

Expand All @@ -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)
Expand All @@ -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)

Expand All @@ -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..<threadCount {
Expand Down
4 changes: 2 additions & 2 deletions Tests/SentryTests/TestClient.swift
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ class TestClient: Client {
recordLostEvents.record((category, reason))
}

var flushInvoctions = Invocations<TimeInterval>()
var flushInvocations = Invocations<TimeInterval>()
override func flush(timeout: TimeInterval) {
flushInvoctions.record(timeout)
flushInvocations.record(timeout)
}
}

Expand Down

0 comments on commit d10145a

Please sign in to comment.