diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2013-08-11 08:02:17 +0200 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2013-08-11 08:50:42 +0200 |
commit | 5f866c4a4b44d39b827a99d82006fa2d375c0ba9 (patch) | |
tree | ec36b7ca3a260350fab344346cc5e8148d5b3559 /tests | |
parent | a702df0e6b2cf5d523a8db764d6523d868eba8df (diff) |
Adding BigInts, based off libtomcrypto / libtommath.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-BigInt.cc | 20 |
1 files changed, 20 insertions, 0 deletions
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 <Main.h> +#include <BigInt.h> + +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."); +} |