X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Ftests%2Farbrationals.cpp;fp=src%2Ftests%2Farbrationals.cpp;h=3af559f0e346093b85eaf5d28dbf574977f125be;hp=0000000000000000000000000000000000000000;hb=a7da45c62d5a0604785479f5dfeb1c2a65d0f9de;hpb=3ab3475a54c82cb9f5e0b1dbb88035f341b92d49 diff --git a/src/tests/arbrationals.cpp b/src/tests/arbrationals.cpp new file mode 100644 index 0000000..3af559f --- /dev/null +++ b/src/tests/arbrationals.cpp @@ -0,0 +1,32 @@ +/** + * @file arbrationals.cpp + * @brief Tests Rational + */ + +#include "rational.h" +#include "arbint.h" + +#define TEST_CASES 100 + +using namespace std; +using namespace IPDF; + +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"); +}