From ab8fb94cd8c9b4d394bba93d674774f76ba32abc Mon Sep 17 00:00:00 2001 From: Stefan Krastanov Date: Thu, 12 Sep 2024 09:14:24 -0400 Subject: [PATCH] simplify jet tests --- test/test_jet.jl | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/test/test_jet.jl b/test/test_jet.jl index e50688f..23aae88 100644 --- a/test/test_jet.jl +++ b/test/test_jet.jl @@ -2,26 +2,9 @@ using JET using QuantumOptics, QuantumClifford # to load the extensions -using JET: ReportPass, BasicPass, InferenceErrorReport, UncaughtExceptionReport - -# Custom report pass that ignores `UncaughtExceptionReport` -# Too coarse currently, but it serves to ignore the various -# "may throw" messages for runtime errors we raise on purpose -# (mostly on malformed user input) -struct MayThrowIsOk <: ReportPass end - -# ignores `UncaughtExceptionReport` analyzed by `JETAnalyzer` -(::MayThrowIsOk)(::Type{UncaughtExceptionReport}, @nospecialize(_...)) = return - -# forward to `BasicPass` for everything else -function (::MayThrowIsOk)(report_type::Type{<:InferenceErrorReport}, @nospecialize(args...)) - BasicPass()(report_type, args...) -end - using InteractiveUtils, Latexify, SymbolicUtils rep = report_package("QuantumSymbolics"; - report_pass=MayThrowIsOk(), # TODO have something more fine grained than a generic "do not care about thrown errors" ignored_modules=( AnyFrameModule(InteractiveUtils), AnyFrameModule(Latexify), @@ -30,5 +13,5 @@ rep = report_package("QuantumSymbolics"; ) @show rep @test_broken length(JET.get_reports(rep)) == 0 -@test length(JET.get_reports(rep)) <= 7 +@test length(JET.get_reports(rep)) <= 6 end