Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LCSB-BioCore
COBREXA.jl
Commits
71eff7a4
Commit
71eff7a4
authored
Apr 02, 2020
by
Alberto Noronha
👽
Browse files
Add 2 simple tests for matReader
parent
acfee139
Changes
4
Hide whitespace changes
Inline
Side-by-side
Project.toml
View file @
71eff7a4
...
...
@@ -6,5 +6,6 @@ version = "0.1.0"
[deps]
GLPK
=
"60bf3e95-4087-53dc-ae20-288a0d20c6a6"
JuMP
=
"4076af6c-e467-56ae-b986-b466b2749572"
MAT
=
"23992714-dd62-5051-b70f-ba57cb901cac"
SparseArrays
=
"2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Test
=
"8dfed614-e22c-5e08-85e1-65c5234f0b40"
src/ExaCOBRA.jl
View file @
71eff7a4
module
***
REMOVED
***
export
LinearModel
,
addReaction
,
addReactions
,
solveLP
export
LinearModel
,
addReaction
,
addReactions
,
solveLP
,
loadModel
include
(
"modeling.jl"
)
include
(
"solveLP.jl"
)
include
(
"io/matReader.jl"
)
end
src/io/matReader.jl
View file @
71eff7a4
...
...
@@ -65,5 +65,3 @@ function loadModel(filePath::String, varName::String)
end
close
(
file
)
end
export
loadModel
test/runtests.jl
View file @
71eff7a4
...
...
@@ -2,6 +2,7 @@ using Test
using
SparseArrays
using
***
REMOVED
***
using
JuMP
using
MAT
test_LP
()
=
LinearModel
(
zeros
(
4
,
3
),
zeros
(
4
),
...
...
@@ -70,3 +71,9 @@ end
sol
=
JuMP
.
value
.
(
x
)
@test
sol
≈
[
1.
,
2.
]
end
@testset
"Import MAT"
begin
cp
=
loadModel
(
"agora-model.mat"
,
"model"
)
@test
cp
isa
LinearModel
@test_throws
ErrorException
loadModel
(
"agora-model.mat"
,
"badmodel"
)
end
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