Skip to content

Commit

Permalink
apply feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
krux02 committed Mar 21, 2020
1 parent 9b3ede6 commit bd9694e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/pure/options.nim
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,11 @@ when isMainModule:
check some("a") != stringNone
check intNone == intNone

when compiles(some("a") == some(5)):
check false
when compiles(none(string) == none(int)):
check false

test "get with a default value":
check(some("Correct").get("Wrong") == "Correct")
check(stringNone.get("Correct") == "Correct")
Expand Down

0 comments on commit bd9694e

Please sign in to comment.