Skip to content

Commit

Permalink
Adjust tests to reflect changes in Julia 1.11 nightlies.
Browse files Browse the repository at this point in the history
  • Loading branch information
gafter committed Dec 16, 2023
1 parent f042033 commit 5c33a4c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/rematch.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ file = Symbol(@__FILE__)
@test ex isa LoadError
e = ex.error
@test e isa ErrorException
@test e.msg == "$file:$line: Could not bind `Unknown` as a type (due to `UndefVarError(:Unknown)`)."
err = (VERSION < v"1.11-") ? UndefVarError(:Unknown) : UndefVarError(:Unknown, @__MODULE__)
@test e.msg == "$file:$line: Could not bind `Unknown` as a type (due to `$err`)."
end
end
end
Expand Down Expand Up @@ -454,7 +455,8 @@ end
end

# nested guards can't use later bindings
@test_throws UndefVarError(:y) @match [2,1] begin
err = (VERSION < v"1.11-") ? UndefVarError(:y) : UndefVarError(:y, @__MODULE__)
@test_throws err @match [2,1] begin
[x where y > x, y ] => (x,y)
end
end
Expand Down

0 comments on commit 5c33a4c

Please sign in to comment.