DavidSzczesniak
12/19/2017 - 11:27 AM

Todo Tests

\!h # Example:
# A test for using ical() to set the date in the Date::ICal test suite
use Test::More tests => 1;
use Date::ICal;

my $ical = Date::Ical->new;
$ical->ical('20201231Z');
is($ical->ical, '2020123Z', 'Setting via ical()');

# this produces:
1..1 
not ok 1 - Setting via ical()
# Failed test (- at line 6)
# got: '20010814T233649Z'
# expected: '20201231Z'
# Looks like you failed 1 tests of 1.

# Looks like it's unimplemented. Let's assume we don't have time to fix this. 
# Normally you would just comment out the test and put a note somewhere about it
# However, we'll wrap this test in TODO block, stating explicitly "this test will fail"
...
# That should have the same outcome but without the "Looks like you failed..." line
# That's because it now treats a failue as a successful test.