From f4748074538d39ce548766bde5aacf0a113d74bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20H=C3=A4cker?= Date: Thu, 27 Mar 2025 17:34:04 +0100 Subject: [PATCH] Use version-dependent tests of public keyword --- test/runtests.jl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index a935d4f..601e46a 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -16,7 +16,6 @@ const Ananab = -1 @enumx Fruit Apple Banana @test Fruit isa Module - @test Set(names(Fruit)) == Set([:Fruit, :Apple, :Banana]) @test_broken Set(names(Fruit; all = true)) == Set([:Fruit, :Apple, :Banana, :T]) @test issubset(Set([:Fruit, :Apple, :Banana, :T]), Set(names(Fruit; all = true))) @test Fruit.T <: EnumX.Enum{Int32} <: Base.Enum{Int32} @@ -49,8 +48,13 @@ const Ananab = -1 @test_throws ArgumentError("invalid value for Enum Fruit: 123.") Fruit.T(123) # Public enum member values (#11) - @test Base.ispublic(Fruit, :Apple) - @test Base.ispublic(Fruit, :Banana) + if VERSION >= v"1.11.0-DEV.469" + @test Set(names(Fruit)) == Set([:Fruit, :Apple, :Banana]) + @test Base.ispublic(Fruit, :Apple) + @test Base.ispublic(Fruit, :Banana) + else + @test Set(names(Fruit)) == Set([:Fruit]) + end @test Fruit.Apple < Fruit.Banana