Test::Lazy 0.01
Sponsored Links
Test::Lazy 0.01 Ranking & Summary
File size:
0.006 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
828
Date added:
2007-07-18
Publisher:
Robert Krimen
Test::Lazy 0.01 description
Test::Lazy is a quick and easy way to compose and run tests with useful output.
SYNOPSIS
use Test::Lazy qw/check try/;
check(1 => is => 1);
check(0 => isnt => 1);
check(a => like => qr/[a-zA-Z]/);
check(0 => unlike => qr/a-zA-Z]/);
check(1 => > => 0);
check(0 => < => 1);
try(qw/a/ => eq => a);
try(qw/a/ => ne => b);
try(qw/a/ => is => [a]);
try( < stmt >, < cmpr >, < expected >, [ < msg > ] )
Evaluate < stmt> and compare the result to
using < cmpr>. Optionally provide a < msg> to display on failure. If < msg> is not given, then one will be automatically made from < stmt>, < cmpr>, and < expected>.
try will also try to guess what representation is best for the result of the statement, whether that be single value, ARRAY, or HASH. Itll do this based on what is returned by the statement, and the type of < expected>. See `perldoc -m Test::Lazy` for more detail.
Note, if < expected> is an ARRAY or HASH, this function will convert it to its JSON representation before comparison.
try("2 + 2" => == => 5);
# This will produce the following output:
# Failed test 2 + 2 == 5
# at __FILE__ line __LINE__.
# got: 4
# expected: 5
check( < got>, < cmpr>, < expected>, [ < msg> ] )
Compare < got> to < expected> using < cmpr>. Optionally provide a < msg> to display on failure. If < msg> is not given, then one will be automatically made from < got>, < cmpr>, and < expected>.
Note, if < got> or < expected> is an ARRAY or HASH, this function will convert them to their JSON representation before comparison.
check([qw/a b/] => is => [qw/a b c/]);
# This will produce the following output:
# Failed test ["a","b"] is ["a","b","c"]
# at __FILE__ line __LINE__.
# got: ["a","b"]
# expected: ["a","b","c"]
template( ... )
Convenience function for creating a Test::Lazy::Template. All arguments are directly passed to Test::Lazy::Template-new>.
See Test::Lazy::Template for more details.
Returns a new Test::Lazy::Template object.
cmpr
< cmpr> can be one of the following:
ok, not_ok, is, isnt, like, unlike,
<, >, <=, >=, lt, gt, le, ge, ==, !=, eq, ne,
SYNOPSIS
use Test::Lazy qw/check try/;
check(1 => is => 1);
check(0 => isnt => 1);
check(a => like => qr/[a-zA-Z]/);
check(0 => unlike => qr/a-zA-Z]/);
check(1 => > => 0);
check(0 => < => 1);
try(qw/a/ => eq => a);
try(qw/a/ => ne => b);
try(qw/a/ => is => [a]);
try( < stmt >, < cmpr >, < expected >, [ < msg > ] )
Evaluate < stmt> and compare the result to
try will also try to guess what representation is best for the result of the statement, whether that be single value, ARRAY, or HASH. Itll do this based on what is returned by the statement, and the type of < expected>. See `perldoc -m Test::Lazy` for more detail.
Note, if < expected> is an ARRAY or HASH, this function will convert it to its JSON representation before comparison.
try("2 + 2" => == => 5);
# This will produce the following output:
# Failed test 2 + 2 == 5
# at __FILE__ line __LINE__.
# got: 4
# expected: 5
check( < got>, < cmpr>, < expected>, [ < msg> ] )
Compare < got> to < expected> using < cmpr>. Optionally provide a < msg> to display on failure. If < msg> is not given, then one will be automatically made from < got>, < cmpr>, and < expected>.
Note, if < got> or < expected> is an ARRAY or HASH, this function will convert them to their JSON representation before comparison.
check([qw/a b/] => is => [qw/a b c/]);
# This will produce the following output:
# Failed test ["a","b"] is ["a","b","c"]
# at __FILE__ line __LINE__.
# got: ["a","b"]
# expected: ["a","b","c"]
template( ... )
Convenience function for creating a Test::Lazy::Template. All arguments are directly passed to Test::Lazy::Template-new>.
See Test::Lazy::Template for more details.
Returns a new Test::Lazy::Template object.
cmpr
< cmpr> can be one of the following:
ok, not_ok, is, isnt, like, unlike,
<, >, <=, >=, lt, gt, le, ge, ==, !=, eq, ne,
Test::Lazy 0.01 Screenshot
Test::Lazy 0.01 Keywords
Lazy 0.01
HASH
ARRAY
Quick And Easy Way
quick and easy
Easy Way To
Way To
to compose
run tests
Easy Way
expected
CMPR
check
b
msg
1
Bookmark Test::Lazy 0.01
Test::Lazy 0.01 Copyright
WareSeeker periodically updates pricing and software information of Test::Lazy 0.01 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Test::Lazy 0.01 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
easy way to make money
easy way to stop smoking
easy way to buy hydrocodone online
easy way to lose weight
easy way to roast garlic
quick and easy meals
easy ways to lose weight
easy way to make money on runescape
easy way to memorize the books of the bible
quick and easy recipes
easy way to calculate hours
easy ways to make money
easy way to kickflip
quick and easy thanksgiving crafts for kids
quick and easy school makeup tutorial
quick and easy science project
easy ways to kill yourself
quick and easy halloween costumes
Related Software
Notes List is a simple and easy way to take Notes. Free Download
Ethane is the easy way to thrive ad hoc network. Free Download
Set::Hash is a Perl module with hashes as objects with lots of handy methods and support for method chaining. Free Download
Tie::Trace can easy print debugging with tie. Free Download
Lexi project is a dict client and vocabulary builder. Free Download
Data::Startup is a Perl module with startup options class, override, config methods. Free Download
Text::CPP is a full C Preprocessor in XS. Free Download
Test::Tail::Multi is a Perl module to execute code, monitor dynamic file contents. Free Download
Latest Software
Popular Software
Favourite Software