-
Notifications
You must be signed in to change notification settings - Fork 15
/
sjruntests.jl
92 lines (82 loc) · 2.51 KB
/
sjruntests.jl
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Files with testcode contain ordinary Symata code, except that line
# that start a new expression and begin with "T " are tested The
# expression should return true or false
## FIXME: remove most of all of these imported symbols. Use fully qualified symbols
import Symata
import Symata: @sym, @ex, @exsimple, SymataPlainTest, print_test_results
## Standard test type
## TODO: set this in test.jl so printing test results is an option
symatatest = SymataPlainTest()
# "context_test.sj",
function runalltests()
for f in (
"symbol_test.sj",
"block_test.sj",
"ntable_test.sj",
"flowcontrol_test.sj",
"input_test.sj",
"output_test.sj",
"numeric_test.sj",
"sympy_test.sj",
"pattern_test.sj",
"integral_derivative_test.sj",
"evaluation_test.sj",
"list_test.sj",
"math_function_test.sj",
"numcomb_test.sj",
"ast_translation_test.sj",
"system_test.sj",
"stack_exchange_test.sj",
"part_test.sj",
"shifrin_test.sj",
"function_test.sj",
"up_downvalue_test.sj",
"linalg_test.sj",
"string_test.sj",
"julia_interface_test.sj",
"latex_test.sj",
"measurement_test.sj",
"io_test.sj",
# "old_comparison_test.sj"
"newcomparison_test.sj",
"predicate_test.sj",
"trig_test.sj",
## FIXME! reimplement the following after change in comparison code
# "context_test.sj",
"mxpr_test.sj",
"algebraic_transformation_test.sj",
"attribute_test.sj",
"module_test.sj",
"orderless_test.sj",
"arithmetic_test.sj",
"expression_test.sj",
"spec_fun_test.sj"
)
Symata.runtest(symatatest, f)
println(stdout, "Done testing $f")
Symata.symataevaluate(Meta.parse("Apply(ClearAll, UserSyms())"),
Symata.EvaluateJuliaSyntaxSimple())
end
end
# Test once with Int as default integer type
save_biginput_state = Symata.setkerneloptions(:bigint_input, false)
try
runalltests()
catch e
@warn "Failed running Symata tests"
rethrow(e)
finally
Symata.setkerneloptions(:bigint_input, save_biginput_state)
end
# Test once with BigInt as default integer type
println()
setkerneloptions(:bigint_input, true)
try
runalltests()
catch
@warn "Failed running Symata tests"
finally
setkerneloptions(:bigint_input, save_biginput_state)
end
@exsimple ClearAll(testUserSyms)
print_test_results(symatatest)