File tree 1 file changed +12
-12
lines changed
1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -49,18 +49,18 @@ final class MutexTests: XCTestCase {
49
49
}
50
50
}
51
51
52
- // func testLockIfAvailable_ReturnsValue() {
53
- // let mutex = Mutex("fish")
54
- // mutex.lock.unsafeLock()
55
- // XCTAssertNil(
56
- // mutex.withLockIfAvailable { _ in "chips" }
57
- // )
58
- // mutex.lock.unsafeUnlock()
59
- // XCTAssertEqual(
60
- // mutex.withLockIfAvailable { _ in "chips" },
61
- // "chips"
62
- // )
63
- // }
52
+ func testLockIfAvailable_ReturnsValue( ) {
53
+ let mutex = Mutex ( " fish " )
54
+ mutex. lock. unsafeLock ( )
55
+ XCTAssertNil (
56
+ mutex. withLockIfAvailable { _ in " chips " }
57
+ )
58
+ mutex. lock. unsafeUnlock ( )
59
+ XCTAssertEqual (
60
+ mutex. withLockIfAvailable { _ in " chips " } ,
61
+ " chips "
62
+ )
63
+ }
64
64
65
65
func testWithLockIfAvailable_ThrowsError( ) {
66
66
let mutex = Mutex ( " fish " )
You can’t perform that action at this time.
0 commit comments