Skip to content

Commit

Permalink
More tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Nägele committed Oct 29, 2023
1 parent 46908c3 commit d866919
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,31 @@ using Test
:(z = endos[2] * (lags[2, end - 0] + 0.5 * endos[1]) * params[1] + exos[1, end - -1]),
:(y = lags[1, end - -1] * exos[1, end - 0] * b)
]

# test non-equation
let eqs = @equations begin
Y = C + G
a + b
end
@test_throws ErrorException model(
endos = @variables(Y),
exos = @variables(),
params = @variables(),
eqs = eqs
)
end

# test unused variables
let eqs = @equations begin
Y = C + G
end
@test_throws ErrorException model(
endos = @variables(Y),
exos = @variables(),
params = @variables(),
eqs = eqs
)
end
end

@testset "Default models" begin
Expand Down

0 comments on commit d866919

Please sign in to comment.