From a0533221e9575779dd9eac3ebfefa8c2f179a67c Mon Sep 17 00:00:00 2001 From: Stefan Krastanov Date: Thu, 12 Sep 2024 09:13:46 -0400 Subject: [PATCH] simplify jet tests --- test/test_jet.jl | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/test/test_jet.jl b/test/test_jet.jl index 1ac2459..76db347 100644 --- a/test/test_jet.jl +++ b/test/test_jet.jl @@ -4,25 +4,8 @@ using Test import LinearAlgebra, DelimitedFiles -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 - @testset "JET checks" begin rep = report_package("LDPCDecoders"; - report_pass=MayThrowIsOk(), ignored_modules=( AnyFrameModule(LinearAlgebra), AnyFrameModule(DelimitedFiles), @@ -30,6 +13,6 @@ end ) ) @show rep - @test_broken length(JET.get_reports(rep)) == 0 - @test length(JET.get_reports(rep)) <= 2 + #@test_broken length(JET.get_reports(rep)) == 0 + @test length(JET.get_reports(rep)) == 0 end