Skip to content

Commit af8176e

Browse files
committed
Added test that demonstrates issue with non-standard number types
1 parent 3e3894b commit af8176e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/PartialsTest.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ using Random
55
using ForwardDiff
66
using ForwardDiff: Partials
77

8+
include(joinpath(dirname(@__FILE__), "Furlongs.jl"))
9+
810
samerng() = MersenneTwister(1)
911

1012
@testset "Partials{$N,$T}" for N in (0, 3), T in (Int, Float32, Float64)
@@ -144,6 +146,10 @@ samerng() = MersenneTwister(1)
144146
end
145147
end
146148
end
149+
150+
@testset "non-standard numbers" begin # Will be fixed by changing single_seed to use oneunit rather than one
151+
@test_throws MethodError ForwardDiff.construct_seeds(ForwardDiff.Partials{3, Furlongs.Furlong{1, Float64}})
152+
end
147153
end
148154

149155
io = IOBuffer()

0 commit comments

Comments
 (0)