From 82529194370cdc8744256df596a19fe3cafd1780 Mon Sep 17 00:00:00 2001 From: Takafumi Arakaki Date: Sat, 23 May 2020 14:15:47 -0700 Subject: [PATCH] Test INIT --- test/test_basics.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test_basics.jl b/test/test_basics.jl index 87697675..9e2cb609 100644 --- a/test/test_basics.jl +++ b/test/test_basics.jl @@ -8,6 +8,9 @@ OPS = [*, +, |, &, min, max, Base.add_sum, Base.mul_prod] @testset for op in OPS @test op(Init(op), :anything) === :anything + @test op(:anything, Init(op)) === :anything + @test op(INIT, :anything) === :anything + @test op(:anything, INIT) === :anything @test hasinitialvalue(op) @test hasinitialvalue(typeof(op)) @test isknown(Init(op)) @@ -26,6 +29,11 @@ end @test repr(Init(op)) == "InitialValues.$desired" @test string(Init(op)) == "InitialValues.$desired" end + @testset "INIT" begin + @test repr(INIT; context=:limit => true) == "INIT" + @test repr(INIT) == "InitialValues.INIT" + @test string(INIT) == "InitialValues.INIT" + end end @testset "hasinitialvalue" begin