Skip to content

Commit 37e81c2

Browse files
committed
fix: Remove compiler warning in SingletonTests
1 parent b9cda42 commit 37e81c2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Tests/DesignAlgorithmsKitTests/Creational/SingletonTests.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,9 +253,10 @@ final class SingletonTests: XCTestCase {
253253
// Doesn't override createShared() - would cause fatalError if .shared is accessed
254254
}
255255

256-
// When/Then - Verify the class can be defined
256+
// When/Then - Verify the class can be defined and is a ThreadSafeSingleton
257257
// The fatalError in createShared() would occur at runtime when accessing .shared
258-
XCTAssertTrue(NoCreateSharedSingleton.self is ThreadSafeSingleton.Type)
258+
let type: ThreadSafeSingleton.Type = NoCreateSharedSingleton.self
259+
XCTAssertNotNil(type)
259260
}
260261

261262
func testThreadSafeSingletonInit() {

0 commit comments

Comments
 (0)