From 1492bd88e95c67203328a04945d9c809805966f6 Mon Sep 17 00:00:00 2001 From: Anton Reinhard Date: Wed, 19 Jun 2024 16:13:32 +0200 Subject: [PATCH] Fix tests --- src/particles/spinors.jl | 7 ++++--- test/particles/types.jl | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/particles/spinors.jl b/src/particles/spinors.jl index d26ebe5..d366807 100644 --- a/src/particles/spinors.jl +++ b/src/particles/spinors.jl @@ -118,6 +118,7 @@ end const SpinorVbar = IncomingAntiFermionSpinor -function getindex(SP::T, idx) where {T<:QEDbase.AbstractParticleSpinor} - return idx in (1, 2) ? SP(idx) : throw(BoundsError()) -end +# TODO: reenable when it's no longer in QEDbase +# function getindex(SP::T, idx) where {T<:QEDbase.AbstractParticleSpinor} +# return idx in (1, 2) ? SP(idx) : throw(BoundsError()) +# end diff --git a/test/particles/types.jl b/test/particles/types.jl index 13fec88..4766170 100644 --- a/test/particles/types.jl +++ b/test/particles/types.jl @@ -2,6 +2,10 @@ using QEDbase using StaticArrays using Random +# TODO this can be deleted when QEDbase is released again +# fix for the broadcast tests +Base.broadcastable(part::QEDbase.AbstractParticleType) = Ref(part) + # test function to test scalar broadcasting test_broadcast(x::AbstractParticle) = x test_broadcast(x::ParticleDirection) = x