Division less buggy, still slow
[ipdf/code.git] / src / tests / arbrationals.cpp
diff --git a/src/tests/arbrationals.cpp b/src/tests/arbrationals.cpp
new file mode 100644 (file)
index 0000000..3af559f
--- /dev/null
@@ -0,0 +1,32 @@
+/**
+ * @file arbrationals.cpp
+ * @brief Tests Rational<Arbint>
+ */
+#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<Arbint> a(p1, q1);
+               Debug("Constructed a %u\n",i);
+               Rational<Arbint> b(p2, q2);
+               Debug("Constructed b %u\n",i);
+               
+               
+       }
+       printf("Tests done");
+}

UCC git Repository :: git.ucc.asn.au