X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Ftests%2Farbrationals.cpp;h=09e7a7880a6f78417fc9bc0eb8f02c86d7176eb4;hp=3af559f0e346093b85eaf5d28dbf574977f125be;hb=39599aa6423d3e0181fbfe2aac8f78f388a3f372;hpb=35e4687acd16a28fc923a75d254cdb4fd2fbc524 diff --git a/src/tests/arbrationals.cpp b/src/tests/arbrationals.cpp index 3af559f..09e7a78 100644 --- a/src/tests/arbrationals.cpp +++ b/src/tests/arbrationals.cpp @@ -11,20 +11,19 @@ using namespace std; using namespace IPDF; +#include "rect.h" + int main(int argc, char ** argv) { + + Rect rect(0,0,1,1); + return 0; for (unsigned i = 0; i < TEST_CASES; ++i) { - Debug("Cycle %u",i); - Arbint p1 = 1L;//rand(); - Arbint q1 = 2L;//rand(); - Arbint p2 = rand(); - Arbint q2 = rand(); - Debug("Construct rationals"); - Rational a(p1, q1); - Debug("Constructed a %u\n",i); - Rational b(p2, q2); - Debug("Constructed b %u\n",i); + double d = (double)(rand()) / (double)(rand()); + Rational r(d); + Debug("%f -> %s -> %s/%s", d, r.Str().c_str(), r.P.DigitStr().c_str(), r.Q.DigitStr().c_str()); + }