diff options
author | Steve Kemp <steve@steve.org.uk> | 2013-06-24 13:52:44 +0100 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2013-06-24 13:52:44 +0100 |
commit | 353a8c02ef26caa5d4c6acf816f228da507d78ac (patch) | |
tree | 9f51335ddd74933e3b5b9a9ba91e1c2d89e089e4 /t | |
parent | a068ab0cceaf3b68c731bfd8384ddf352f0f2795 (diff) |
The worst-case for testing a time-period, and one used in the
parser test, is matching against a period that covers the full
24 hours.
Correctly terminate this case, and add a new test-case to ensure
that this is always correct.
Diffstat (limited to 't')
-rwxr-xr-x | t/test-custodian-util-timespan.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/t/test-custodian-util-timespan.rb b/t/test-custodian-util-timespan.rb index 307a171..048f582 100755 --- a/t/test-custodian-util-timespan.rb +++ b/t/test-custodian-util-timespan.rb @@ -150,4 +150,17 @@ class TestTimeSpanUtil < Test::Unit::TestCase end + + # + # Since the implementation of our test involves + # iterating over the specified period then any 24-hour + # period is the worst case. + # + # + def test_worst() + for i in 0..23 + assert( Custodian::Util::TimeSpan.inside?( 0, 23, i ) ) + end + + end end |