Created
January 30, 2018 19:34
-
-
Save rizumita/07cada389aa70b32e615c82469d722b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test("Optional Binding") { | |
for _ in 0...repeatCount { | |
let unrapped: String | |
if let tmp = s { | |
unrapped = tmp | |
} else { | |
unrapped = "default" | |
} | |
} | |
} | |
test("??") { | |
for _ in 0...repeatCount { | |
let unrapped = s ?? "default" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment