diff options
Diffstat (limited to 't/test-custodian-util-timespan.rb')
-rwxr-xr-x | t/test-custodian-util-timespan.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/t/test-custodian-util-timespan.rb b/t/test-custodian-util-timespan.rb index 200b8e1..307a171 100755 --- a/t/test-custodian-util-timespan.rb +++ b/t/test-custodian-util-timespan.rb @@ -39,17 +39,27 @@ class TestTimeSpanUtil < Test::Unit::TestCase assert_raise ArgumentError do result = Custodian::Util::TimeSpan.inside?( 1, i ) end + + assert_raise ArgumentError do + result = Custodian::Util::TimeSpan.inside?( 1, 2, i ) + end end # # Now negative values. # for i in 1..50 + assert_raise ArgumentError do result = Custodian::Util::TimeSpan.inside?( 1, ( -1 * i ) ) end + + assert_raise ArgumentError do + result = Custodian::Util::TimeSpan.inside?( ( -1 * i ), 1 ) + end + assert_raise ArgumentError do - result = Custodian::Util::TimeSpan.inside?( ( -1 * i ), 1 ) + result = Custodian::Util::TimeSpan.inside?( 1, 1, ( -1 * i ) ) end end |