1
1
using MathML, EzXML, Symbolics, SpecialFunctions, IfElse, AbstractTrees, Test
2
-
2
+ using Symbolics : variable
3
3
# these tests mimic the README examples
4
4
fn = " data/math.xml"
5
5
doc = readxml (fn)
@@ -213,26 +213,26 @@ str = """
213
213
@test isequal (MathML. parse_str (str), [x + y, 3 , 7 ])
214
214
215
215
str = " <bvar><ci>x</ci></bvar>"
216
- @test isequal (MathML. parse_str (str), (Num (Variable (:x )), 1 ))
216
+ @test isequal (MathML. parse_str (str), (Num (variable (:x )), 1 ))
217
217
218
218
str = " <bvar><ci>x</ci><degree><cn>2</cn></degree></bvar>"
219
- @test isequal (MathML. parse_str (str), (Num (Variable (:x )), 2 ))
219
+ @test isequal (MathML. parse_str (str), (Num (variable (:x )), 2 ))
220
220
221
221
str = """
222
222
<apply><diff/>
223
223
<bvar><ci>x</ci></bvar>
224
224
<apply><sin/><ci>x</ci></apply>
225
225
</apply>
226
226
"""
227
- @test isequal (expand_derivatives (MathML. parse_str (str)), cos (Num (Variable (:x ))))
227
+ @test isequal (expand_derivatives (MathML. parse_str (str)), cos (Num (variable (:x ))))
228
228
229
229
str = """
230
230
<apply><diff/>
231
231
<bvar><ci>x</ci><degree><cn>2</cn></degree></bvar>
232
232
<apply><power/><ci>x</ci><cn>4</cn></apply>
233
233
</apply>
234
234
"""
235
- @test isequal (expand_derivatives (MathML. parse_str (str)), 12 * Num (Variable (:x ))^ 2 )
235
+ @test isequal (expand_derivatives (MathML. parse_str (str)), 12 * Num (variable (:x ))^ 2 )
236
236
237
237
# macro test
238
238
ml = MathML """
@@ -241,7 +241,7 @@ ml = MathML"""
241
241
<apply><power/><ci>x</ci><cn>4</cn></apply>
242
242
</apply>
243
243
"""
244
- @test isequal (expand_derivatives (ml), 12 * Num (Variable (:x ))^ 2 )
244
+ @test isequal (expand_derivatives (ml), 12 * Num (variable (:x ))^ 2 )
245
245
246
246
str = """
247
247
<lambda>
0 commit comments