]> www.ginac.de Git - cln.git/blob - tests/test_I_io.cc
* Fix typo.
[cln.git] / tests / test_I_io.cc
1 #include "test_I.h"
2 #include <cln/input.h>
3 #include <sstream>
4
5 int test_I_io (int iterations)
6 {
7         int error = 0;
8         for (int i = iterations; i > 0; i--) {
9                 cl_I a = testrandom_I();
10                 int base = iterations % (36-1) + 2;
11                 cl_read_flags rflags = {syntax_integer, lsyntax_standard, base};
12                 stringstream buf;
13                 print_integer(buf, base, a);
14                 ASSERT1(a == read_integer(buf, rflags), a);
15         }
16         return error;
17 }