Skip to content

Commit

Permalink
test: Fix predicate descriptor on iOS 14 (#2935)
Browse files Browse the repository at this point in the history
Running the SentryPredicateDescriptorTests on iOS 14 simulators locally crashed with
EXC_BAD_ACCESS. This is fixed now by providing an argument array.
  • Loading branch information
philipphofmann authored Apr 20, 2023
1 parent 455619d commit 9ef729b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tests/SentryTests/SentryPredicateDescriptorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@ class SentryPredicateDescriptorTests: XCTestCase {
}

func test_andCompound() {
let pred = NSPredicate(format: "field1 = %@ and field2 = %@")
let pred = NSPredicate(format: "field1 = %@ and field2 = %@", "arg1", "arg2")
assertPredicate(predicate: pred, expectedResult: "field1 == %@ AND field2 == %@")
}

func test_orCompound() {
let pred = NSPredicate(format: "field1 = %@ or field2 = %@")
let pred = NSPredicate(format: "field1 = %@ or field2 = %@", "arg1", "arg2")
assertPredicate(predicate: pred, expectedResult: "field1 == %@ OR field2 == %@")
}

Expand Down

0 comments on commit 9ef729b

Please sign in to comment.