From 2609cbbeefd3ee6face96af53bf72162a66ad4fb Mon Sep 17 00:00:00 2001 From: coffeepots Date: Tue, 17 Apr 2018 15:56:57 +0100 Subject: [PATCH] Add test for string <-> Uint/Int --- tests/test1.nim | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test1.nim b/tests/test1.nim index 8df25ba..a0229d9 100644 --- a/tests/test1.nim +++ b/tests/test1.nim @@ -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"