-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #109 from giordano/mg/bump-compat
Allow SpecialFunctions v0.9 and v0.10
- Loading branch information
Showing
3 changed files
with
8 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,11 @@ | ||
using Test | ||
import GSL | ||
|
||
@testset "Error Handling" begin | ||
@info "Testing error handler..." | ||
try | ||
GSL.vector_alloc(typemax(Csize_t)) | ||
catch e | ||
@test typeof(e) == OutOfMemoryError | ||
end | ||
# This is only needed to make `@test_logs` work with the custom error handling | ||
# of GSL.jl | ||
Base.occursin(r::Regex, err::GSL.C.GSLError) = occursin(r, repr(err)) | ||
|
||
@info "Testing error handler..." | ||
try | ||
sf_hyperg_2F1(1,2,3,4) | ||
catch e | ||
@test typeof(e) == DomainError | ||
end | ||
@testset "Error Handling" begin | ||
@test_logs (:warn, r"GSL Error 8") @test_throws OutOfMemoryError GSL.vector_alloc(typemax(Csize_t)) | ||
@test_logs (:warn, r"GSL Error 1") @test_throws DomainError sf_hyperg_2F1(1,2,3,4) | ||
end |
8b815fb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
8b815fb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
8b815fb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
8b815fb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/14971
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: