]> www.ginac.de Git - cln.git/blob - tests/test_I_oddp.cc
Fix crashes in find_univpoly_ring and related functions
[cln.git] / tests / test_I_oddp.cc
1 #include "test_I.h"
2
3 int test_I_oddp (int iterations)
4 {
5         int error = 0;
6         int i;
7         // Check against division.
8         for (i = iterations; i > 0; i--) {
9                 cl_I a = testrandom_I();
10                 cl_I r = mod(a,2);
11                 ASSERT1(oddp(a) == (r!=0), a);
12         }
13         return error;
14 }