Skip to content

Commit 5ee55f0

Browse files
committed
Update perf tests to no longer use TARGET_IPHONE_SIMULATOR
1 parent 1699ed6 commit 5ee55f0

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

RealmSwift/Tests/PerformanceTests.swift

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,14 @@ private nonisolated(unsafe) var smallRealm: Realm!
4444
private nonisolated(unsafe) var mediumRealm: Realm!
4545
private nonisolated(unsafe) var largeRealm: Realm!
4646

47-
private let isRunningOnDevice = TARGET_IPHONE_SIMULATOR == 0
48-
4947
@available(*, deprecated) // Silence deprecation warnings for RealmOptional
5048
class SwiftPerformanceTests: TestCase, @unchecked Sendable {
5149
override class var defaultTestSuite: XCTestSuite {
52-
#if !DEBUG && os(iOS) && !targetEnvironment(macCatalyst)
53-
if isRunningOnDevice {
54-
return super.defaultTestSuite
55-
}
56-
#endif
50+
#if !DEBUG && os(iOS) && !targetEnvironment(macCatalyst) && !targetEnvironment(simulator)
51+
return super.defaultTestSuite
52+
#else
5753
return XCTestSuite(name: "SwiftPerformanceTests")
54+
#endif
5855
}
5956

6057
override class func setUp() {
@@ -943,12 +940,11 @@ class SwiftPerformanceTests: TestCase, @unchecked Sendable {
943940

944941
class SwiftSyncRealmPerformanceTests: TestCase, @unchecked Sendable {
945942
override class var defaultTestSuite: XCTestSuite {
946-
#if !DEBUG && os(iOS) && !targetEnvironment(macCatalyst)
947-
if isRunningOnDevice {
948-
return super.defaultTestSuite
949-
}
950-
#endif
943+
#if !DEBUG && os(iOS) && !targetEnvironment(macCatalyst) && !targetEnvironment(simulator)
944+
return super.defaultTestSuite
945+
#else
951946
return XCTestSuite(name: "SwiftSyncRealmPerformanceTests")
947+
#endif
952948
}
953949

954950
override func measure(_ block: (() -> Void)) {

0 commit comments

Comments
 (0)