@@ -8,15 +8,7 @@ using Random: Random
88using StableRNGs: StableRNG
99using Test
1010using .. Models: gdemo_default
11- import ForwardDiff, ReverseDiff
12-
13- # Skip Mooncake on 1.12 as it is not compatible yet
14- const INCLUDE_MOONCAKE = VERSION < v " 1.12"
15- if INCLUDE_MOONCAKE
16- import Pkg
17- Pkg. add (" Mooncake" )
18- using Mooncake: Mooncake
19- end
11+ import ForwardDiff, ReverseDiff, Mooncake
2012
2113""" Element types that are always valid for a VarInfo regardless of ADType."""
2214const always_valid_eltypes = (AbstractFloat, AbstractIrrational, Integer, Rational)
@@ -33,10 +25,8 @@ eltypes_by_adtype = Dict(
3325 ReverseDiff. TrackedVecOrMat,
3426 ReverseDiff. TrackedVector,
3527 ),
28+ AutoMooncake => (Mooncake. CoDual,),
3629)
37- if INCLUDE_MOONCAKE
38- eltypes_by_adtype[AutoMooncake] = (Mooncake. CoDual,)
39- end
4030
4131"""
4232 AbstractWrongADBackendError
177167"""
178168All the ADTypes on which we want to run the tests.
179169"""
180- ADTYPES = [AutoForwardDiff (), AutoReverseDiff (; compile= false )]
181- if INCLUDE_MOONCAKE
182- push! (ADTYPES, AutoMooncake (; config= nothing ))
183- end
170+ ADTYPES = [AutoForwardDiff (), AutoReverseDiff (; compile= false ), AutoMooncake ()]
184171
185172# Check that ADTypeCheckContext itself works as expected.
186173@testset " ADTypeCheckContext" begin
0 commit comments