|
|
|
@ -16,7 +16,7 @@ const Ananab = -1 |
|
|
|
@enumx Fruit Apple Banana |
|
|
|
@enumx Fruit Apple Banana |
|
|
|
|
|
|
|
|
|
|
|
@test Fruit isa Module |
|
|
|
@test Fruit isa Module |
|
|
|
@test Set(names(Fruit)) == Set([:Fruit]) |
|
|
|
@test Set(names(Fruit)) == Set([:Fruit, :Apple, :Banana]) |
|
|
|
@test_broken Set(names(Fruit; all = true)) == Set([:Fruit, :Apple, :Banana, :T]) |
|
|
|
@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 issubset(Set([:Fruit, :Apple, :Banana, :T]), Set(names(Fruit; all = true))) |
|
|
|
@test Fruit.T <: EnumX.Enum{Int32} <: Base.Enum{Int32} |
|
|
|
@test Fruit.T <: EnumX.Enum{Int32} <: Base.Enum{Int32} |
|
|
|
@ -48,6 +48,10 @@ const Ananab = -1 |
|
|
|
@test_throws ArgumentError("invalid value for Enum Fruit: 123.") Fruit.T(Int32(123)) |
|
|
|
@test_throws ArgumentError("invalid value for Enum Fruit: 123.") Fruit.T(Int32(123)) |
|
|
|
@test_throws ArgumentError("invalid value for Enum Fruit: 123.") Fruit.T(123) |
|
|
|
@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) |
|
|
|
|
|
|
|
|
|
|
|
@test Fruit.Apple < Fruit.Banana |
|
|
|
@test Fruit.Apple < Fruit.Banana |
|
|
|
|
|
|
|
|
|
|
|
let io = IOBuffer() |
|
|
|
let io = IOBuffer() |
|
|
|
|