Skip to content

Commit b1827e1

Browse files
authored
simplify jet tests (#21)
1 parent a0aa967 commit b1827e1

File tree

1 file changed

+2
-19
lines changed

1 file changed

+2
-19
lines changed

test/test_jet.jl

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,15 @@ using Test
44

55
import LinearAlgebra, DelimitedFiles
66

7-
using JET: ReportPass, BasicPass, InferenceErrorReport, UncaughtExceptionReport
8-
9-
# Custom report pass that ignores `UncaughtExceptionReport`
10-
# Too coarse currently, but it serves to ignore the various
11-
# "may throw" messages for runtime errors we raise on purpose
12-
# (mostly on malformed user input)
13-
struct MayThrowIsOk <: ReportPass end
14-
15-
# ignores `UncaughtExceptionReport` analyzed by `JETAnalyzer`
16-
(::MayThrowIsOk)(::Type{UncaughtExceptionReport}, @nospecialize(_...)) = return
17-
18-
# forward to `BasicPass` for everything else
19-
function (::MayThrowIsOk)(report_type::Type{<:InferenceErrorReport}, @nospecialize(args...))
20-
BasicPass()(report_type, args...)
21-
end
22-
237
@testset "JET checks" begin
248
rep = report_package("LDPCDecoders";
25-
report_pass=MayThrowIsOk(),
269
ignored_modules=(
2710
AnyFrameModule(LinearAlgebra),
2811
AnyFrameModule(DelimitedFiles),
2912
AnyFrameModule(Base.Broadcast),
3013
)
3114
)
3215
@show rep
33-
@test_broken length(JET.get_reports(rep)) == 0
34-
@test length(JET.get_reports(rep)) <= 2
16+
#@test_broken length(JET.get_reports(rep)) == 0
17+
@test length(JET.get_reports(rep)) == 0
3518
end

0 commit comments

Comments
 (0)