X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Ftests%2Farbrationals.cpp;h=f26314c5177ee0179b44057b75977cf6367e18f7;hp=3af559f0e346093b85eaf5d28dbf574977f125be;hb=e297312c8c82e52abd3507c861e85db497ca7e81;hpb=a7da45c62d5a0604785479f5dfeb1c2a65d0f9de diff --git a/src/tests/arbrationals.cpp b/src/tests/arbrationals.cpp index 3af559f..f26314c 100644 --- a/src/tests/arbrationals.cpp +++ b/src/tests/arbrationals.cpp @@ -11,22 +11,18 @@ using namespace std; using namespace IPDF; +#include "rect.h" + int main(int argc, char ** argv) { - 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); - - - } - printf("Tests done"); + + Rational a(1, 2); + Rational b(3, 9); + Rational c(b); + + Rational d(c); + c *= a; + Debug("%s * %s = %s", d.Str().c_str(), a.Str().c_str(), c.Str().c_str()); + return 0; + }