#include "BigIntegerLibrary.hh"
#include <string>
#include <iostream>
Go to the source code of this file.
Value:do {\
cout << "Line " << __LINE__ << ": ";\
try {\
cout << (expr);\
} catch (const char *err) {\
cout << "error";\
}\
cout << endl;\
} while (0)
Definition at line 15 of file testsuite.cc.
Definition at line 25 of file testsuite.cc.
28 cout <<
"check: Unzapped number!" << endl;
30 cout <<
"check: Capacity inconsistent with length!" << endl;
Index getCapacity() const
Blk getBlock(Index i) const
Definition at line 34 of file testsuite.cc.
36 cout <<
"check: Sign should not be zero!" << endl;
38 cout <<
"check: Sign should be zero!" << endl;
const BigUnsigned & getMagnitude() const
const BigUnsigned & check(const BigUnsigned &x)
Definition at line 47 of file testsuite.cc.
220 TEST(bb.getBlock(0));
221 TEST(bb.getBlock(1));
225 TEST(bb.getBlock(0));
226 TEST(bb.getBlock(1));
227 TEST(bb.getBlock(2));
228 TEST(bb.getBlock(314159));
246 TEST(bbb.bitLength());
248 bbb.setBit(32,
true);
250 bbb.setBit(31,
true);
251 bbb.setBit(32,
false);
277 num.divideWithRemainder(denom, quotient);
321 }
catch (
const char *err) {
322 cout <<
"UNCAUGHT ERROR: " << err << endl;
void setBlock(Index i, Blk newBlock)
BigInteger stringToBigInteger(const std::string &s)
const BigUnsigned & check(const BigUnsigned &x)
Blk getBlock(Index i) const
BigUnsigned stringToBigUnsigned(const std::string &s)
void divideWithRemainder(const BigInteger &b, BigInteger &q)
int pathologicalInt = ~((unsigned int)(~0) >> 1) |
long pathologicalLong = ~((unsigned long)(~0) >> 1) |
short pathologicalShort = ~((unsigned short)(~0) >> 1) |