-
Notifications
You must be signed in to change notification settings - Fork 8
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 #52 from JuliaMath/dw/testext
Make Test a weak dependency
- Loading branch information
Showing
6 changed files
with
57 additions
and
32 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,27 @@ | ||
name = "InverseFunctions" | ||
uuid = "3587e190-3f89-42d0-90ee-14403ec27112" | ||
version = "0.1.15" | ||
version = "0.1.16" | ||
|
||
[deps] | ||
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
||
[weakdeps] | ||
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
||
[extensions] | ||
DatesExt = "Dates" | ||
InverseFunctionsDatesExt = "Dates" | ||
InverseFunctionsTestExt = "Test" | ||
|
||
[compat] | ||
julia = "1" | ||
|
||
[extras] | ||
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" | ||
|
||
[targets] | ||
test = ["Dates", "Documenter", "Unitful"] | ||
test = ["Dates", "Documenter", "Test", "Unitful"] |
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,4 +1,4 @@ | ||
module DatesExt | ||
module InverseFunctionsDatesExt | ||
|
||
using Dates | ||
import InverseFunctions: inverse | ||
|
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module InverseFunctionsTestExt | ||
|
||
using Test: @test, @testset | ||
using InverseFunctions: InverseFunctions, inverse | ||
|
||
function InverseFunctions.test_inverse(f, x; compare=isapprox, kwargs...) | ||
@testset "test_inverse: $f with input $x" begin | ||
y = f(x) | ||
inverse_f = inverse(f) | ||
@test compare(inverse_f(y), x; kwargs...) | ||
inverse_inverse_f = inverse(inverse_f) | ||
@test compare(inverse_inverse_f(x), y; kwargs...) | ||
end | ||
return nothing | ||
end | ||
|
||
end |
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 was deleted.
Oops, something went wrong.