33 lines
1.2 KiB
C++
33 lines
1.2 KiB
C++
|
#include <aeryn/test_runner.hpp>
|
||
|
#include <aeryn/is_equal.hpp>
|
||
|
#include <aeryn/use_name.hpp>
|
||
|
#include "../src/cheapgmp.hpp"
|
||
|
#include "../src/accessories.hpp"
|
||
|
|
||
|
using namespace cheapgmp;
|
||
|
|
||
|
wstring sample123 = L"72367033806371673149109894141163778628811792657571658906010558390395870363798401744095280686155507736404921657070284961721828960592977909542637098897697223102622628566787654091327825453991595140205701412961364188732408936197890553699715836951569999800431957769217006743321026257517932764164662319487914962533302741368207211189494615326552790667720411285474162636765168907211924134973374304496019635376665858559941735703924836467756917247995469583487467791524582153744522107597865277798136080074161485280424274076931083994487111719562249702540362855712911132265966235754355353516703339043001506118520760359577737869472018617942120590873170710805078696371738906375721785723";
|
||
|
|
||
|
ulong sample6 = 46656;
|
||
|
|
||
|
void testSmallToLong() {
|
||
|
IS_EQUAL(tolong(makepower(6, 6)), sample6);
|
||
|
}
|
||
|
|
||
|
void testLargeToString() {
|
||
|
IS_EQUAL(tostring(makepower(123, 321)), sample123);
|
||
|
}
|
||
|
|
||
|
int main()
|
||
|
{
|
||
|
using namespace Aeryn;
|
||
|
TestRunner testRunner;
|
||
|
testRunner.Add(TestCase(USE_NAME(testSmallToLong)));
|
||
|
testRunner.Add(TestCase(USE_NAME(testLargeToString)));
|
||
|
return testRunner.Run();
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|