Commit 71eff7a4 authored by Alberto Noronha's avatar Alberto Noronha 👽
Browse files

Add 2 simple tests for matReader

parent acfee139
......@@ -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"
module ***REMOVED***
export LinearModel, addReaction, addReactions, solveLP
export LinearModel, addReaction, addReactions, solveLP, loadModel
include("modeling.jl")
include("solveLP.jl")
include("io/matReader.jl")
end
......@@ -65,5 +65,3 @@ function loadModel(filePath::String, varName::String)
end
close(file)
end
export loadModel
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment