tparseuints.nim 330 B

1234567891011121314
  1. discard """
  2. action: run
  3. output: '''
  4. [Suite] parseutils'''
  5. """
  6. import unittest, strutils
  7. suite "parseutils":
  8. test "uint":
  9. check: parseBiggestUInt("0") == 0'u64
  10. check: parseBiggestUInt("18446744073709551615") == 0xFFFF_FFFF_FFFF_FFFF'u64
  11. expect(ValueError):
  12. discard parseBiggestUInt("18446744073709551616")