Skip to content

Commit

Permalink
Actually run the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Feb 5, 2021
1 parent eef7e8c commit 0b5677d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/macros.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,7 @@ Returns a new variable.
Extensions should define a method with additional positional arguments to
dispatch the call to a different method. The return type should only depend on
the positional arguments for [`variable_type`](@ref) to make sense.
the positional arguments for `variable_type` to make sense.
As an example, `@variable(model, x, foo)` foo will call
`build_variable(_error, info, foo)`
Expand Down
3 changes: 2 additions & 1 deletion test/macros.jl
Original file line number Diff line number Diff line change
Expand Up @@ -732,14 +732,15 @@ end
end

@testset "unrecognized_variable_type" begin
model = Model()
err = ErrorException(
"In `@variable(model, x, 2, variable_type = 1)`: Unrecognized " *
"arguments: 2, 1. (You may have passed these as positional " *
"arguments, or as a keyword value to `variable_type`.)\n\nIf " *
"you're trying to create a JuMP extension, you need to implement " *
"`build_variable`."
)
@test_macro_throws(err, @variable(model, x, 2, variable_type = 1))
@test_throws_strip err @variable(model, x, 2, variable_type = 1)
end
end

Expand Down

0 comments on commit 0b5677d

Please sign in to comment.