diff --git a/test/activate.jl b/test/activate.jl new file mode 100644 index 0000000..d360514 --- /dev/null +++ b/test/activate.jl @@ -0,0 +1,33 @@ +@testset "Loading and unloading a model" begin + GU = GamsUniverse() + + @create_set!(GU,:i,"Test Set",begin + a,"elm" + b,"elm2" + end) + + alias(GU,:i,:j) + + + + @create_parameters(GU,begin + :p, (:i,:j), "test parm" + end) + + deactivate(GU,:i,:a) + + + @create_parameters(GU,begin + :q, (:i,:j), "test parm" + end) + + @test GU[:p][:i,:j] == [0 0] + @test GU[:q][:i,:j] == [0 0] + + activate(GU,:i,:a) + + + @test GU[:p][:i,:j] == [0 0; 0 0] + @test GU[:q][:i,:j] == [0 0; 0 0] + +end \ No newline at end of file diff --git a/test/runtests.jl b/test/runtests.jl index bc6e86e..3abacbf 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -6,7 +6,7 @@ using GamsStructure include("load_unload.jl") - + include("activate.jl") end \ No newline at end of file