summary refs log blame commit diff stats
path: root/tests/stdlib/tunittest.nim
blob: b23b3cdab594b734661883f35840fc3a88ad7cfe (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
               















                                                                



                               
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))