mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
Doesn't actually fix those bugs, but they can no longer be reproduced. Test cases have been added.
22 lines
375 B
Nim
22 lines
375 B
Nim
import unittest
|
|
|
|
|
|
proc doThings(spuds: var int): int =
|
|
spuds = 24
|
|
return 99
|
|
test "#964":
|
|
var spuds = 0
|
|
check doThings(spuds) == 99
|
|
check spuds == 24
|
|
|
|
|
|
from strutils import toUpper
|
|
test "#1384":
|
|
check(@["hello", "world"].map(toUpper) == @["HELLO", "WORLD"])
|
|
|
|
|
|
import options
|
|
test "unittest typedescs":
|
|
check(none(int) == none(int))
|
|
check(none(int) != some(1))
|