Skip to content
This repository was archived by the owner on Mar 22, 2025. It is now read-only.

Commit 70258dc

Browse files
committed
Test for handling negative time windows
1 parent 247110a commit 70258dc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/time.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ end
6666
@testset "incompatible time type" begin
6767
# Time is of type Int64, but window is given as a Float64 -> this should throw.
6868
@test_throws ArgumentError TimeWindowAssociativeOp{Float64,+,Int64}(10.0)
69+
# A negative or zero time window should throw
70+
@test_throws ArgumentError TimeWindowAssociativeOp{Float64,+,Int64}(-10)
71+
@test_throws ArgumentError TimeWindowAssociativeOp{Float64,+,Int64}(0)
6972
end
7073

7174
@testset "integral" begin

0 commit comments

Comments
 (0)