Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LCSB-BioCore
SBML.jl
Commits
2a825add
Commit
2a825add
authored
Jun 17, 2021
by
paulflang
Browse files
insert blank first line
parent
bc73ca63
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/sbml2symbolics.jl
View file @
2a825add
@register
Base
.
factorial
(
x
)
# Todo: remove this line once factorial is registered per default
function
parse_piecewise
(
val
,
cond
,
other
)
...
...
test/sbml2symbolics.jl
View file @
2a825add
@testset
"Math to Symbolics conversions"
begin
A
=
Symbolics
.
Variable
(
Symbol
(
"A"
))
B
=
Symbolics
.
Variable
(
Symbol
(
"B"
))
C
=
Symbolics
.
Variable
(
Symbol
(
"C"
))
D
=
Symbolics
.
Variable
(
Symbol
(
"D"
))
E
=
Symbolics
.
Variable
(
Symbol
(
"E"
))
test
=
SBML
.
MathApply
(
"*"
,
SBML
.
Math
[
SBML
.
MathApply
(
"+"
,
SBML
.
Math
[
SBML
.
MathApply
(
"*"
,
SBML
.
Math
[
SBML
.
MathIdent
(
"A"
),
SBML
.
MathIdent
(
"B"
)]),
SBML
.
MathApply
(
"-"
,
SBML
.
Math
[
SBML
.
MathApply
(
"*"
,
SBML
.
Math
[
SBML
.
MathIdent
(
"C"
),
SBML
.
MathIdent
(
"D"
)])])]),
SBML
.
MathIdent
(
"E"
)])
expr_true
=
(
A
*
B
-
C
*
D
)
*
E
ex
=
convert
(
Num
,
test
)
@test
isequal
(
convert
(
Num
,
test
),
expr_true
)
end
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment