- Enhanced unit tests in response to bug #624 (thanks to Steve Rader).
This commit is contained in:
Paul Beckingham 2011-01-08 11:12:39 -05:00
parent b5c46062c6
commit 0c05069baf
2 changed files with 6 additions and 2 deletions

View file

@ -73,6 +73,7 @@
+ Applied patch to fix bug #618, so that the configuration setting + Applied patch to fix bug #618, so that the configuration setting
'edit.verbose' can be set to 'no' and eliminate the help text when using 'edit.verbose' can be set to 'no' and eliminate the help text when using
the 'task edit' command (thanks to Steve Rader). the 'task edit' command (thanks to Steve Rader).
+ Enhanced unit tests in response to bug #624 (thanks to Steve Rader).
------ old releases ------------------------------ ------ old releases ------------------------------

View file

@ -48,7 +48,7 @@ int convertDuration (const std::string& input)
int main (int argc, char** argv) int main (int argc, char** argv)
{ {
UnitTest t (606); UnitTest t (608);
Duration d; Duration d;
@ -627,7 +627,9 @@ int main (int argc, char** argv)
t.ok (d.valid ("-1 sec"), "valid duration -1 sec"); t.ok (d.valid ("-1 sec"), "valid duration -1 sec");
t.ok (d.valid ("-1s"), "valid duration -1s"); t.ok (d.valid ("-1s"), "valid duration -1s");
t.notok (d.valid ("woof"), "valid duration woof = fail"); t.ok (d.valid ("-"), "valid duration -");
t.notok (d.valid ("woof"), "valid duration woof = fail");
t.is (convertDuration ("daily"), 1, "valid duration daily"); t.is (convertDuration ("daily"), 1, "valid duration daily");
t.is (convertDuration ("day"), 1, "valid duration day"); t.is (convertDuration ("day"), 1, "valid duration day");
@ -695,6 +697,7 @@ int main (int argc, char** argv)
t.is (convertDuration ("10 day"), 10, "valid duration 10 day"); t.is (convertDuration ("10 day"), 10, "valid duration 10 day");
t.is (convertDuration ("10d"), 10, "valid duration 10d"); t.is (convertDuration ("10d"), 10, "valid duration 10d");
t.is (convertDuration ("-"), 0, "valid duration -");
try try
{ {
Duration left, right; Duration left, right;