From d5bdfdb5c40ef4d9df9ee8c01b4b621642611ec1 Mon Sep 17 00:00:00 2001 From: Steve Kemp Date: Mon, 24 Jun 2013 13:52:44 +0100 Subject: 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. --- t/test-custodian-util-timespan.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 't') 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 -- cgit v1.2.1