Skip to content

Commit ff9d79a

Browse files
committed
final test correction
1 parent b10570c commit ff9d79a

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

test/runtests.jl

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,16 @@ using Test
2121
end
2222

2323
constprop = false
24-
@test_throws ErrorException @macroexpand(@testinferred mysqrt(-3) constprop = constprop)
25-
@test_throws ErrorException @macroexpand(@constinferred mysqrt(-3) constprop = false broken = true x = 6)
26-
@test_throws ErrorException @macroexpand(@testinferred mysqrt(-3) constprop = VERSION > v"1")
27-
@test_throws ErrorException @macroexpand(@testinferred mysqrt(-3) this_is_not_a_keyword = true)
28-
@test_throws ErrorException @macroexpand(@testinferred mysqrt(-3) this_is_not_valid)
24+
errortype = @static if VERSION < v"1.7"
25+
LoadError
26+
else
27+
ErrorException
28+
end
29+
@test_throws errortype @macroexpand(@testinferred mysqrt(-3) constprop = constprop)
30+
@test_throws errortype @macroexpand(@constinferred mysqrt(-3) constprop = false broken = true x = 6)
31+
@test_throws errortype @macroexpand(@testinferred mysqrt(-3) constprop = VERSION > v"1")
32+
@test_throws errortype @macroexpand(@testinferred mysqrt(-3) this_is_not_a_keyword = true)
33+
@test_throws errortype @macroexpand(@testinferred mysqrt(-3) this_is_not_valid)
2934

3035
@constinferred Nothing iterate(1:5)
3136
@testinferred Nothing iterate(1:-1) constprop = true

0 commit comments

Comments
 (0)