From d49f93dd4208d13bd77d7f4e1e048ddbc99c0fb6 Mon Sep 17 00:00:00 2001 From: Martijn Visser Date: Tue, 17 Nov 2020 14:37:42 +0100 Subject: [PATCH] tests: move out other structs --- test/runtests.jl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 28070a3..06d121e 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -2,8 +2,15 @@ using Test using BasicModelInterface const BMI = BasicModelInterface +# dummy model structs to test the interface struct UnknownModel end +struct KnownModel + waterlevel::Matrix{Float64} +end + +struct MyModel end + @testset "BasicModelInterface.jl" begin @testset "no BMI implementation" begin @@ -15,10 +22,6 @@ struct UnknownModel end end @testset "some BMI implementation" begin - struct KnownModel - waterlevel::Matrix{Float64} - end - function BMI.initialize(model::KnownModel) known_model.waterlevel[:] .= 0.0 end @@ -32,7 +35,6 @@ end @testset "interface functions are defined" begin # not necessarily correct parameters # only needed to verify that the function is defined, but does not have methods yet - struct MyModel end model = MyModel() time = 1.0 name = "myparam"