Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ DimensionalData = "0703355e-b756-11e9-17c0-8b28908087d0"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
InvertedIndices = "41ab1584-1d38-5bbf-9106-f11c6c58b48f"
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
Expand All @@ -23,7 +22,6 @@ DimensionalData = "0.29, 0.30"
Distributions = "0.25"
Documenter = "0.26.3, 0.27, 1"
InvertedIndices = "1"
JET = "0.9, 0.10, 0.11, 0.12"
LinearAlgebra = "<0.0.1, 1"
OffsetArrays = "1"
OrderedCollections = "1, 2"
Expand Down
23 changes: 0 additions & 23 deletions test/varname/varname.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ module VarNameTests

using AbstractPPL
using Test
using JET: @test_call

@testset "varname/varname.jl" verbose = true begin
@testset "basic construction (and type stability)" begin
Expand Down Expand Up @@ -60,28 +59,6 @@ using JET: @test_call
end
end

@testset "JET on equality + dynamic dispatch" begin
# This test is very specific, so some context is needed:
#
# In DynamicPPL it's quite common to want to search for a VarName in a collection of
# VarNames. Usually the collection will not have a concrete element type (because
# it's a mixture of different optics). Thus, there will be a fair amount of dynamic
# dispatch when performing the comparisons.
#
# In AbstractPPL, there is custom code in `src/varname/optic.jl` to make sure that
# equality comparisons of `Index` lenses are JET-friendly even when this happens
# (i.e., JET.jl doesn't error on `@report_call`). These were needed because base
# Julia's equality methods on tuples error with JET:
# https://github.com/JuliaLang/julia/issues/60470, and using those default methods
# would cause test failures in DynamicPPLJETExt.
#
# This test therefore makes sure we don't cause any regressions.
vns = [@varname(x), @varname(x[1]), @varname(x.a)]
for vn in vns
@test_call any(k -> k == vn, vns)
end
end

@testset "pretty-printing" begin
@test string(@varname(x)) == "x"
@test string(@varname(x[1])) == "x[1]"
Expand Down
Loading