File: test_MI.cc

package info (click to toggle)
cln 1.3.7-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,996 kB
  • sloc: cpp: 80,860; sh: 5,138; ansic: 3,174; makefile: 1,274
file content (27 lines) | stat: -rw-r--r-- 764 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <iostream>
#include "base/cl_macros.h"

extern int test_MI_canonhom (int iterations);
extern int test_MI_plus (int iterations);
extern int test_MI_minus (int iterations);
extern int test_MI_mul (int iterations);
extern int test_MI_recip (int iterations);
extern int test_MI_div (int iterations);
extern int test_MI_expt (int iterations);

#define RUN(tester,iterations)  \
	std::cout << "Testing "#tester"..." << std::endl; \
	error |= tester (iterations);

int test_MI (int iterations)
{
	int error = 0;
	RUN(test_MI_canonhom,iterations);
	RUN(test_MI_plus,iterations);
	RUN(test_MI_minus,iterations);
	RUN(test_MI_mul,iterations);
	RUN(test_MI_recip,iterations);
	RUN(test_MI_div,iterations);
	RUN(test_MI_expt,ceiling(iterations,20));
	return error;
}