Skip to content

Commit 66900e7

Browse files
committed
Add regression tests
1 parent f0b0e08 commit 66900e7

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ SpecialFunctionsChainRulesCoreExt = "ChainRulesCore"
1919
ChainRulesCore = "0.9.44, 0.10, 1"
2020
ChainRulesTestUtils = "0.6.8, 0.7, 1"
2121
IrrationalConstants = "0.1, 0.2"
22+
JET = "0.9, 0.10"
2223
LogExpFunctions = "0.3.2"
2324
OpenLibm_jll = "0.7, 0.8"
2425
OpenSpecFun_jll = "0.5"
@@ -27,8 +28,9 @@ julia = "1.10"
2728
[extras]
2829
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
2930
ChainRulesTestUtils = "cdddcdb0-9152-4a09-a978-84456f9df70a"
31+
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
3032
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
3133
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
3234

3335
[targets]
34-
test = ["ChainRulesCore", "ChainRulesTestUtils", "Random", "Test"]
36+
test = ["ChainRulesCore", "ChainRulesTestUtils", "JET", "Random", "Test"]

test/logabsgamma.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,11 @@ x = 8.000001f0
156156
# (i.e. prevfloat(8.000001f0) == 8.0f0)
157157
# We still check appropriate behavior at 8.0f0
158158
@test ulp(8.0f0) < 0.4006594736129046
159+
160+
@testset "JET" begin
161+
# issue #502
162+
JET.@test_call logabsgamma(1.0)
163+
JET.@test_opt logabsgamma(1.0)
164+
JET.@test_call logabsgamma(1f0)
165+
JET.@test_opt logabsgamma(1f0)
166+
end

test/runtests.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ using Random
77
using Test
88
using Base.MathConstants: γ
99

10+
using JET: JET
11+
1012
using SpecialFunctions: AmosException, f64
1113

1214
# useful test functions for relative error, which differ from isapprox
@@ -44,4 +46,4 @@ for t in tests
4446
@testset "$(t)" begin
4547
include(tp)
4648
end
47-
end
49+
end

0 commit comments

Comments
 (0)