using SciMLTesting, DifferentialEquations, JET, Test

const NONMODULE_REEXPORTS = (
    :AbstractAnalyticalProblem,
    :AddVector,
    :AffineOperator,
    :AllObserved,
    :AnalyticalProblem,
    :AutoFiniteDiff,
    :AutoForwardDiff,
    :AutoSparse,
    :AutoTsit5,
    :AutoVern6,
    :AutoVern7,
    :AutoVern8,
    :AutoVern9,
    :BVPFunction,
    :BVProblem,
    :BatchIntegralFunction,
    :BlockDiagonalOperator,
    :CallbackSet,
    :CheckInit,
    :ContinuousCallback,
    :ConvexOptimizationProblem,
    :DAEFunction,
    :DAEProblem,
    :DAESolution,
    :DDEFunction,
    :DDEProblem,
    :DefaultODEAlgorithm,
    :DiagonalOperator,
    :DiscreteCallback,
    :DiscreteFunction,
    :DiscreteProblem,
    :DynamicalBVPFunction,
    :DynamicalDDEFunction,
    :DynamicalDDEProblem,
    :DynamicalODEFunction,
    :DynamicalODEProblem,
    :DynamicalSDEFunction,
    :DynamicalSDEProblem,
    :EigenvalueProblem,
    :EigenvalueSolution,
    :EnsembleContext,
    :EnsembleDistributed,
    :EnsembleProblem,
    :EnsembleSerial,
    :EnsembleSolution,
    :EnsembleSplitThreads,
    :EnsembleSummary,
    :EnsembleTestSolution,
    :EnsembleThreads,
    :FBDF,
    :FunctionOperator,
    :HomotopyNonlinearFunction,
    :HomotopyProblem,
    :IdentityOperator,
    :ImplicitDiscreteFunction,
    :ImplicitDiscreteProblem,
    :IncrementingODEFunction,
    :IncrementingODEProblem,
    :IntegralFunction,
    :IntegralProblem,
    :IntegralSolution,
    :IntervalNonlinearFunction,
    :IntervalNonlinearProblem,
    :InvertibleOperator,
    :LinearAliasSpecifier,
    :LinearProblem,
    :LinearSolution,
    :MatrixOperator,
    :MultiObjectiveOptimizationFunction,
    :NoiseProblem,
    :NonlinearFunction,
    :NonlinearLeastSquaresProblem,
    :NonlinearProblem,
    :NonlinearSolution,
    :NullOperator,
    :ODEAliasSpecifier,
    :ODEFunction,
    :ODEInputFunction,
    :ODEProblem,
    :ODESolution,
    :OptimizationFunction,
    :OptimizationProblem,
    :OptimizationSolution,
    :PDENoTimeSolution,
    :PDEProblem,
    :PDETimeSeriesSolution,
    :RODEFunction,
    :RODEProblem,
    :RODESolution,
    :Rodas5P,
    :Rosenbrock23,
    :SCCNonlinearProblem,
    :SDDEFunction,
    :SDDEProblem,
    :SDEFunction,
    :SDEProblem,
    :SampledIntegralProblem,
    :ScalarOperator,
    :SecondOrderBVProblem,
    :SecondOrderDDEProblem,
    :SecondOrderODEProblem,
    :SplitFunction,
    :SplitODEProblem,
    :SplitSDEFunction,
    :SplitSDEProblem,
    :StaticWOperator,
    :SteadyStateProblem,
    :SteadyStateSolution,
    :TensorProductOperator,
    :TensorSumOperator,
    :TimeDomain,
    :Tsit5,
    :TwoPointBVPFunction,
    :TwoPointBVProblem,
    :TwoPointDynamicalBVPFunction,
    :TwoPointSecondOrderBVProblem,
    :VectorContinuousCallback,
    :Vern6,
    :Vern7,
    :Vern8,
    :Vern9,
    :WOperator,
    :add_saveat!,
    :add_tstop!,
    :addat!,
    :addat_non_user_cache!,
    :addsteps!,
    :auto_dt_reset!,
    :cache_operator,
    :change_t_via_interpolation!,
    :check_error,
    :check_keywords,
    :concretize,
    :deleteat!,
    :deleteat_non_user_cache!,
    :derivative_discontinuity!,
    :discretize,
    :du_cache,
    :first_tstop,
    :full_cache,
    :get_dt,
    :get_du,
    :get_du!,
    :get_proposed_dt,
    :get_rng,
    :get_tmp_cache,
    :has_adjoint,
    :has_concretization,
    :has_exp,
    :has_expmv,
    :has_expmv!,
    :has_ldiv,
    :has_ldiv!,
    :has_mul,
    :has_mul!,
    :has_rng,
    :has_tstop,
    :init,
    :is_discrete_time_domain,
    :iscached,
    :isclock,
    :isconstant,
    :iscontinuous,
    :isconvertible,
    :isdiscrete,
    :isinplace,
    :islinear,
    :issolverstepclock,
    :issquare,
    :kronsum,
    :pop_tstop!,
    :rand_cache,
    :ratenoise_cache,
    :reeval_internals_due_to_modification!,
    :reinit!,
    :remake,
    :resize_non_user_cache!,
    :savevalues!,
    :set_abstol!,
    :set_proposed_dt!,
    :set_reltol!,
    :set_rng!,
    :set_t!,
    :set_u!,
    :solve,
    :solve!,
    :step!,
    :successful_retcode,
    :supports_solve_rng,
    :symbolic_discretize,
    :terminate!,
    :u_cache,
    :u_modified!,
    :update_coefficients,
    :update_coefficients!,
    :user_cache,
    :warn_compat,
)

const INTENTIONAL_REEXPORTS = (
    NONMODULE_REEXPORTS...,
    :Clocks,
    :EigenvalueTarget,
    :EnsembleAnalysis,
    :OrdinaryDiffEq,
    :ReturnCode,
    :SciMLBase,
    :SciMLLogging,
    :SciMLOperators,
)

run_qa(
    DifferentialEquations;
    api_docs_kwargs = (; rendered_ignore = NONMODULE_REEXPORTS),
    jet_kwargs = (; target_defined_modules = true),
    reexports_allow = INTENTIONAL_REEXPORTS,
)
