From 5f866c4a4b44d39b827a99d82006fa2d375c0ba9 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sun, 11 Aug 2013 08:02:17 +0200 Subject: Adding BigInts, based off libtomcrypto / libtommath. --- tests/test-BigInt.cc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/test-BigInt.cc (limited to 'tests') diff --git a/tests/test-BigInt.cc b/tests/test-BigInt.cc new file mode 100644 index 0000000..df69e64 --- /dev/null +++ b/tests/test-BigInt.cc @@ -0,0 +1,20 @@ +#include +#include + +using namespace Balau; + +void MainTask::Do() { + Printer::log(M_STATUS, "Test::BigInt running."); + + { + BigInt a, b; + uint64_t t = 10000000000000000000; + String s = "10000000000000000000"; + a.set(t); + b.set(s); + TAssert(a == b); + TAssert(a.toString() == s); + } + + Printer::log(M_STATUS, "Test::BigInt passed."); +} -- cgit v1.2.3