Skip to content

Commit

Permalink
Test INIT
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed May 23, 2020
1 parent a202270 commit 8252919
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/test_basics.jl
Expand Up @@ -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))
Expand All @@ -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
Expand Down

0 comments on commit 8252919

Please sign in to comment.