From 1ce7e2fe2c6e9b7c5d69bf69587ca28d47c933b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20N=C3=A4gele?= Date: Sun, 29 Oct 2023 15:35:52 +0100 Subject: [PATCH] Fixed tests and added one more --- test/runtests.jl | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index c309be8..11f795e 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -27,17 +27,29 @@ using Test ) end - # test unused variables + # test missing variables let eqs = @equations begin - Y = C + G + Y = C end - @test_throws ErrorException model( + @test_warn "Symbols [:C] are not in variables or parameters" model( endos = @variables(Y), exos = @variables(), params = @variables(), eqs = eqs ) end + + # test unused variables + let eqs = @equations begin + Y = C + end + @test_throws ErrorException model( + endos = @variables(Y, C, G), + exos = @variables(), + params = @variables(), + eqs = eqs + ) + end end @testset "Default models" begin