Skip to content

Commit 0ceb68d

Browse files
authored
Merge pull request #40 from SciML/aj/sym4
symbolics 4. also fix tests to remove Variable depwarn
2 parents 9c10b75 + 4e69e26 commit 0ceb68d

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "MathML"
22
uuid = "abcecc63-2b08-419c-80c4-c63dca6fa478"
33
authors = ["anand <[email protected]> and contributors"]
4-
version = "0.1.9"
4+
version = "0.1.10"
55

66
[deps]
77
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
@@ -18,7 +18,7 @@ DocStringExtensions = "0.8"
1818
EzXML = "1.1"
1919
IfElse = "0.1"
2020
SpecialFunctions = "1.3"
21-
Symbolics = "3"
21+
Symbolics = "3, 4"
2222
julia = "1"
2323

2424
[extras]

test/parse.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using MathML, EzXML, Symbolics, SpecialFunctions, IfElse, AbstractTrees, Test
2-
2+
using Symbolics: variable
33
# these tests mimic the README examples
44
fn = "data/math.xml"
55
doc = readxml(fn)
@@ -213,26 +213,26 @@ str = """
213213
@test isequal(MathML.parse_str(str), [x + y, 3, 7])
214214

215215
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))
217217

218218
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))
220220

221221
str = """
222222
<apply><diff/>
223223
<bvar><ci>x</ci></bvar>
224224
<apply><sin/><ci>x</ci></apply>
225225
</apply>
226226
"""
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))))
228228

229229
str = """
230230
<apply><diff/>
231231
<bvar><ci>x</ci><degree><cn>2</cn></degree></bvar>
232232
<apply><power/><ci>x</ci><cn>4</cn></apply>
233233
</apply>
234234
"""
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)
236236

237237
# macro test
238238
ml = MathML"""
@@ -241,7 +241,7 @@ ml = MathML"""
241241
<apply><power/><ci>x</ci><cn>4</cn></apply>
242242
</apply>
243243
"""
244-
@test isequal(expand_derivatives(ml), 12 * Num(Variable(:x))^2)
244+
@test isequal(expand_derivatives(ml), 12 * Num(variable(:x))^2)
245245

246246
str = """
247247
<lambda>

0 commit comments

Comments
 (0)