UNPKG

2.05 kBtext/coffeescriptView Raw
1# self test functions
2
3test_low_level = ->
4 run("clearall"); # to initialize stack and memory
5
6 test_clearall()
7 test_inv()
8 test_printlatex()
9 test_mixedprint()
10 test_inner()
11 test_transpose()
12 test_signs_in_rationals()
13 test_madd()
14 test_msub()
15 test_mmul()
16 test_mdiv()
17 test_mmod()
18 test_mprime()
19 test_mgcd()
20 test_mpow()
21 test_mroot()
22 test_dependencies()
23 test_assignments()
24 test_caching()
25 test_strings()
26 test_test()
27 test_check()
28
29# use the window.selftest version
30# for running the tests from the
31# browser console ("run npm build-for-browser")
32#window.selftest = ->
33selftest = ->
34 test_low_level()
35 test_pattern()
36 test_abs()
37 test_sum()
38 test_product()
39 test_for()
40 test_exp()
41 test_expand()
42 test_factorpoly()
43 test_subst()
44 test_simplify()
45
46 test_multiply()
47 test_scan()
48 test_power()
49 test_factor_number(); # long
50 test_tensor()
51 test_bake()
52 test_adj()
53 test_arg()
54 test_approxratio()
55 test_besselj()
56 test_bessely()
57 test_ceiling()
58 test_choose()
59 test_circexp()
60 test_clock()
61 test_cofactor()
62 test_condense()
63 test_contract()
64 test_defint(); # very long
65 test_denominator()
66 test_derivative()
67 test_dirac()
68 test_erf()
69 test_erfc()
70 test_expcos()
71 test_expsin()
72 test_float()
73 test_floor()
74 test_gamma()
75 test_gcd()
76 test_imag()
77 test_lcm()
78 test_log()
79 #test_mod()
80 test_nroots()
81 test_numerator()
82 test_outer()
83 test_polar()
84 test_quotient()
85 test_rationalize()
86 test_real()
87 test_rect()
88 test_round()
89 test_sgn()
90 test_taylor()
91 test_zero()
92 test_hermite()
93 test_laguerre()
94 test_legendre()
95 test_binomial()
96 test_divisors()
97 test_coeff()
98 test_sin()
99 test_cos()
100 test_tan()
101 test_sinh()
102 test_cosh()
103 test_tanh()
104 test_arcsin()
105 test_arcsinh()
106 test_arccos()
107 test_arccosh()
108 test_arctan()
109 test_arctanh()
110 test_index()
111 test_isprime()
112 test_eigen()
113 test_shape()
114 mini_test()
115 test_quickfactor()
116 test_integral()
117 test_roots()
118
119
120 # alert "passed tests: " + ok_tests + " / failed tests: " + ko_tests
121 return
122
123# remove this selftest()
124# for running the tests from the
125# browser console ("run npm build-for-browser")
126selftest()