Skip to content

Commit e8fb9b7

Browse files
committed
[Test] improve test coverage
1 parent ad6c689 commit e8fb9b7

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/runtests.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,17 @@ if occursin("General", MODULES_TO_TEST)
5858
# Test hygiene of @model macro
5959
include("hygiene.jl")
6060
end
61+
62+
if occursin("Test", MODULES_TO_TEST)
63+
# This test is run just so that we can get code coverage on the `@testset`
64+
# in `MOI.Test.runtests`. The `@testset` line doesn't get "hit" if we run
65+
# via a normal `test_foo()` function because in the happy path, all tests
66+
# will pass, and the `@testset "$(file)" begin` will absorb it without
67+
# printing anything. Arguably, this is a bug with coverage, but macros are
68+
# hard.
69+
MOI.Test.runtests(
70+
MOI.Utilities.Model{Float64}(),
71+
MOI.Test.Config();
72+
include = [r"test_model_default_ObjectiveSense"],
73+
)
74+
end

0 commit comments

Comments
 (0)