Next | Automated Testing | 30 |
This works all right:
ok($nosuch->level eq "x", "default level is x");
But this is more convenient:
is($nosuch->level, "x", "default level is x");
If $nosuch->level returns "x", this is just the same as the ok version
ok 13 - default level is x
If not, it includes a useful comment:
not ok 13 - default level is x # Failed test (testfile.t at line 1) # got: 't' # expected: 'x'
There's also isnt
Also like and unlike which do a regex match
There's some other stuff, but it's not very important
See man Test::More for details
Next | Copyright © 2004 Mark Dominus |