]> www.ginac.de Git - cln.git/commitdiff
Move factorial check from test section to exam section...
authorRichard Kreckel <kreckel@ginac.de>
Wed, 1 Jan 2020 11:38:02 +0000 (12:38 +0100)
committerRichard Kreckel <kreckel@ginac.de>
Wed, 1 Jan 2020 11:38:02 +0000 (12:38 +0100)
...since it has no randomness and no iterations, cf. tests/FILES.

tests/Makefile.am
tests/exam.cc
tests/exam_I_factorial.cc [moved from tests/test_I_factorial.cc with 73% similarity]
tests/test_I.cc

index 57c077778fa2c584a7ce8d944f71e5b6672c76aa..dc8beb0cf02f1d84b450698e9684ad3ae0be4fca 100644 (file)
@@ -60,8 +60,8 @@ exam_SOURCES = exam.h exam.cc \
               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 \
@@ -78,12 +78,11 @@ tests_SOURCES = test.h tests.cc test_I.cc test_I.h test_I_abs.cc test_I_compare.
        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
index ca1be027e80d7ca8096ff122ba0ae3eb91067989..1b4cfe652f7a4bf07121c0960408364fde2944f7 100644 (file)
@@ -11,6 +11,8 @@ extern int test_sfloat();
 extern int test_ffloat();
 extern int test_dfloat();
 extern int test_lfloat();
+extern int test_factorial();
+extern int test_doublefactorial();
 
 int test_elementary (void)
 {
@@ -35,6 +37,8 @@ int test_all (void)
        error |= test_gcd();
        error |= test_xgcd();
        error |= test_sqrtp();
+       error |= test_factorial();
+       error |= test_doublefactorial();
        return error;
 }
 
similarity index 73%
rename from tests/test_I_factorial.cc
rename to tests/exam_I_factorial.cc
index bae2513b179fcc14ad5dbacf6a5099a6e8bf8ade..d85629a50b08438e0a0e704a013f7f5371504fc0 100644 (file)
@@ -1,13 +1,13 @@
 #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);
index 5338a3177b2c14ad7948b63300976f96f2a8f0b4..8e5ea63f494dd4604a71ebe70f4ef469a005b42c 100644 (file)
@@ -45,8 +45,6 @@ extern int test_I_sqrtp (int iterations);
 // 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; \
@@ -101,7 +99,5 @@ int test_I (int iterations)
        // Miscellaneous.
        RUN(test_I_io,iterations);
        RUN(test_I_GV,iterations);
-       RUN(test_I_factorial, iterations);
-       RUN(test_I_doublefactorial, iterations);
        return error;
 }