...since it has no randomness and no iterations, cf. tests/FILES.
exam_DF_div.cc exam_DF_floor.cc \
exam_LF.cc exam_LF_plus.cc exam_LF_minus.cc exam_LF_mul.cc \
exam_LF_div.cc exam_LF_floor.cc \
- exam_I_gcd.cc exam_I_sqrtp.cc test_MI.h test.h
-
+ exam_I_gcd.cc exam_I_sqrtp.cc exam_I_factorial.cc test_MI.h test.h
+
exam_LDADD = ../src/libcln.la
tests_SOURCES = test.h tests.cc test_I.cc test_I.h test_I_abs.cc test_I_compare.cc \
test_I_logcount.cc test_I_ilength.cc test_I_ord2.cc \
test_I_power2p.cc test_I_isqrt.cc test_I_sqrtp.cc \
test_I_io.cc test_I_GV.cc \
- test_I_factorial.cc \
test_MI.h test_MI.cc test_MI_canonhom.cc test_MI_plus.cc \
test_MI_minus.cc test_MI_mul.cc test_MI_recip.cc \
test_MI_div.cc test_MI_expt.cc \
test_nt.h test_nt.cc test_nt_jacobi.cc
-
+
tests_LDADD = ../src/libcln.la
timemul_SOURCES = timemul.cc
extern int test_ffloat();
extern int test_dfloat();
extern int test_lfloat();
+extern int test_factorial();
+extern int test_doublefactorial();
int test_elementary (void)
{
error |= test_gcd();
error |= test_xgcd();
error |= test_sqrtp();
+ error |= test_factorial();
+ error |= test_doublefactorial();
return error;
}
#include "test_I.h"
-int test_I_factorial(int /* iterations */) {
+int test_factorial() {
int error = 0;
cl_I result = factorial(14U);
ASSERT1(result > cl_I(UINT64_C(1) << 32), result);
return error;
}
-int test_I_doublefactorial(int /* iterations */) {
+int test_doublefactorial() {
int error = 0;
cl_I result = doublefactorial(21U);
ASSERT1(result > cl_I(UINT64_C(1) << 32), result);
// Miscellaneous.
extern int test_I_io (int iterations);
extern int test_I_GV (int iterations);
-extern int test_I_factorial(int iterations);
-extern int test_I_doublefactorial(int iterations);
#define RUN(tester,iterations) \
std::cout << "Testing "#tester"..." << std::endl; \
// Miscellaneous.
RUN(test_I_io,iterations);
RUN(test_I_GV,iterations);
- RUN(test_I_factorial, iterations);
- RUN(test_I_doublefactorial, iterations);
return error;
}