include("../../testutils.jl")

using DifferentiationInterface, DifferentiationInterfaceTest
using Test
using Zygote: ZygoteRuleConfig

using ExplicitImports
check_no_implicit_imports(DifferentiationInterface)

for backend in [AutoChainRules(ZygoteRuleConfig())]
    @test check_available(backend)
    @test !check_inplace(backend)
    test_counterparts(backend)
end

test_differentiation(
    AutoChainRules(ZygoteRuleConfig()),
    default_scenarios();
    excluded = [:second_derivative],
    logging = LOGGING,
);

test_differentiation(
    AutoChainRules(ZygoteRuleConfig()),
    default_scenarios(; include_normal = false, include_constantified = true);
    excluded = SECOND_ORDER,
    logging = LOGGING,
);
