Skip to content

Commit

Permalink
Fixed tests and added one more
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Nägele committed Oct 29, 2023
1 parent d866919 commit 1ce7e2f
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1ce7e2f

Please sign in to comment.