]> www.ginac.de Git - cln.git/blob - tests/test_I_ord2.cc
Enable modifying operators by default.
[cln.git] / tests / test_I_ord2.cc
1 #include "test_I.h"
2
3 int test_I_ord2 (int iterations)
4 {
5         int error = 0;
6         int i;
7         // Check against ash and oddp.
8         for (i = iterations; i > 0; i--) {
9                 cl_I a = testrandom_I();
10                 if (a != 0) {
11                         uintC n = ord2(a);
12                         cl_I b = ash(a,-(sintC)n);
13                         ASSERT1(oddp(b), a);
14                         ASSERT1(a == ash(b,(sintC)n), a);
15                 }
16         }
17         return error;
18 }