mirror of
https://github.com/status-im/nim-ttmath.git
synced 2025-02-23 17:58:10 +00:00
Add test for string <-> Uint/Int
This commit is contained in:
parent
0d547441d1
commit
2609cbbeef
@ -1,6 +1,16 @@
|
||||
import ttmath, unittest, strutils
|
||||
|
||||
suite "ttmath":
|
||||
test "String <-> Int":
|
||||
let
|
||||
a = i256"123456789012345679801234"
|
||||
strVal = $a
|
||||
check strVal == "123456789012345679801234"
|
||||
test "String <-> UInt":
|
||||
let
|
||||
a = u256"123456789012345679801234"
|
||||
strVal = $a
|
||||
check strVal == "123456789012345679801234"
|
||||
test "Ints":
|
||||
let a = i256"12345678910111213141516"
|
||||
let b = i256"16151413121110987654321"
|
||||
|
Loading…
x
Reference in New Issue
Block a user