diff options
author | Daniil Yarancev <21169548+Yardanico@users.noreply.github.com> | 2018-06-05 21:25:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-05 21:25:45 +0300 |
commit | 642641359821b6a63c6cf7edaaa45873b7ea59c7 (patch) | |
tree | 627af3020528cb916b3174bd94304307ca875c77 /tests/misc/tunsignedcmp.nim | |
parent | fb44c522e6173528efa8035ecc459c84887d0167 (diff) | |
parent | 3cbc07ac7877b03c605498760fe198e3200cc197 (diff) | |
download | Nim-642641359821b6a63c6cf7edaaa45873b7ea59c7.tar.gz |
Merge pull request #2 from nim-lang/devel
Update
Diffstat (limited to 'tests/misc/tunsignedcmp.nim')
-rw-r--r-- | tests/misc/tunsignedcmp.nim | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/tests/misc/tunsignedcmp.nim b/tests/misc/tunsignedcmp.nim index 9ffc0d119..11b67ac5f 100644 --- a/tests/misc/tunsignedcmp.nim +++ b/tests/misc/tunsignedcmp.nim @@ -1,7 +1,17 @@ discard """ output: '''true true -true''' +true +5 +4 +3 +2 +1 +0 +it should stop now +18446744073709551615 +4294967295 +''' """ # bug 1420 @@ -11,3 +21,23 @@ echo x > y # works echo((40'i32) > (30'i32)) echo((40'u32) > (30'u32)) # Error: ordinal type expected + +# bug #4220 + +const count: uint = 5 +var stop_me = false + +for i in countdown(count, 0): + echo i + if stop_me: break + if i == 0: + echo "it should stop now" + stop_me = true + +# bug #3985 +const + HIGHEST_64BIT_UINT = 0xFFFFFFFFFFFFFFFF'u + HIGHEST_32BIT_UINT = 0xFFFFFFFF'u + +echo($HIGHEST_64BIT_UINT) +echo($HIGHEST_32BIT_UINT) |