diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-03-31 16:35:25 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-03-31 16:35:25 +0200 |
commit | b296e7c01f3d29e2e429bfc1fc4203727cd3b1ce (patch) | |
tree | 5debdaf0b92934af508d9ef2568c654682f6fb64 /tests/stdlib/tparseuints.nim | |
parent | d836028fe7b18c93c9a9751f470da387eab09af1 (diff) | |
parent | c34a68d76f7f552b235592da7634acc333275df9 (diff) | |
download | Nim-b296e7c01f3d29e2e429bfc1fc4203727cd3b1ce.tar.gz |
Merge pull request #4013 from vegansk/parse_uints
parseUInt and parseBiggestUInt functions
Diffstat (limited to 'tests/stdlib/tparseuints.nim')
-rw-r--r-- | tests/stdlib/tparseuints.nim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/stdlib/tparseuints.nim b/tests/stdlib/tparseuints.nim new file mode 100644 index 000000000..5be3bcbd0 --- /dev/null +++ b/tests/stdlib/tparseuints.nim @@ -0,0 +1,11 @@ +discard """ + action: run +""" +import unittest, strutils + +suite "parseutils": + test "uint": + check: parseBiggestUInt("0") == 0'u64 + check: parseBiggestUInt("18446744073709551615") == 0xFFFF_FFFF_FFFF_FFFF'u64 + expect(ValueError): + discard parseBiggestUInt("18446744073709551616") |