Skip to content

Commit

Permalink
fix SentryDataCategoryMapperTests
Browse files Browse the repository at this point in the history
  • Loading branch information
denrase committed Jul 17, 2024
1 parent 68e6bf2 commit 5d8e18c
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ class SentryDataCategoryMapperTests: XCTestCase {
XCTAssertEqual(sentryDataCategoryForNSUInteger(8), .metricBucket)
XCTAssertEqual(sentryDataCategoryForNSUInteger(9), .replay)
XCTAssertEqual(sentryDataCategoryForNSUInteger(10), .profileChunk)
XCTAssertEqual(sentryDataCategoryForNSUInteger(11), .unknown)
XCTAssertEqual(sentryDataCategoryForNSUInteger(11), .span)
XCTAssertEqual(sentryDataCategoryForNSUInteger(12), .unknown)

XCTAssertEqual(.unknown, sentryDataCategoryForNSUInteger(11), "Failed to map unknown category number to case .unknown")
XCTAssertEqual(.unknown, sentryDataCategoryForNSUInteger(13), "Failed to map unknown category number to case .unknown")
}

func testMapStringToCategory() {
Expand All @@ -44,6 +45,7 @@ class SentryDataCategoryMapperTests: XCTestCase {
XCTAssertEqual(sentryDataCategoryForString(kSentryDataCategoryNameProfileChunk), .profileChunk)
XCTAssertEqual(sentryDataCategoryForString(kSentryDataCategoryNameMetricBucket), .metricBucket)
XCTAssertEqual(sentryDataCategoryForString(kSentryDataCategoryNameReplay), .replay)
XCTAssertEqual(sentryDataCategoryForString(kSentryDataCategoryNameSpan), .span)
XCTAssertEqual(sentryDataCategoryForString(kSentryDataCategoryNameUnknown), .unknown)

XCTAssertEqual(.unknown, sentryDataCategoryForString("gdfagdfsa"), "Failed to map unknown category name to case .unknown")
Expand All @@ -61,6 +63,7 @@ class SentryDataCategoryMapperTests: XCTestCase {
XCTAssertEqual(nameForSentryDataCategory(.profileChunk), kSentryDataCategoryNameProfileChunk)
XCTAssertEqual(nameForSentryDataCategory(.metricBucket), kSentryDataCategoryNameMetricBucket)
XCTAssertEqual(nameForSentryDataCategory(.replay), kSentryDataCategoryNameReplay)
XCTAssertEqual(nameForSentryDataCategory(.span), kSentryDataCategoryNameSpan)
XCTAssertEqual(nameForSentryDataCategory(.unknown), kSentryDataCategoryNameUnknown)
}
}

0 comments on commit 5d8e18c

Please sign in to comment.