Test::LectroTest 0.3500
Sponsored Links
Test::LectroTest 0.3500 Ranking & Summary
File size:
0.053 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
975
Date added:
2007-02-21
Publisher:
Tom Moertel
Test::LectroTest 0.3500 description
Test::LectroTest is a Perl module with easy, automatic, specification-based tests.
SYNOPSIS
#!/usr/bin/perl -w
use MyModule; # contains code we want to test
use Test::LectroTest;
Property {
##[ x <- Int, y <- Int ]##
MyModule::my_function( $x, $y ) >= 0;
}, name => "my_function output is non-negative" ;
Property { ... }, name => "yet another property" ;
# more properties to check here
This module provides a simple (yet full featured) interface to LectroTest, an automated, specification-based testing system for Perl. To use it, declare properties that specify the expected behavior of your software. LectroTest then checks your software to see whether those properties hold.
Declare properties using the Property function, which takes a block of code and promotes it to a Test::LectroTest::Property:
Property {
##[ x <- Int, y <- Int ]##
MyModule::my_function( $x, $y ) >= 0;
}, name => "my_function output is non-negative" ;
The first part of the block must contain a generator-binding declaration. For example:
##[ x <- Int, y <- Int ]##
(Note the special bracketing, which is required.) This particular binding says, "For all integers x and y." (By the way, you arent limited to integers. LectroTest also gives you booleans, strings, lists, hashes, and more, and it lets you define your own generator types. See Test::LectroTest::Generator for more.)
The second part of the block is simply a snippet of code that makes use of the variables we bound earlier to test whether a property holds for the piece of software we are testing:
MyModule::my_function( $x, $y ) >= 0;
In this case, it asserts that MyModule::my_function($x,$y) returns a non-negative result. (Yes, $x and $y refer to the same x and y that we bound to the generators earlier. LectroTest automagically loads these lexically bound Perl variables with values behind the scenes.)
SYNOPSIS
#!/usr/bin/perl -w
use MyModule; # contains code we want to test
use Test::LectroTest;
Property {
##[ x <- Int, y <- Int ]##
MyModule::my_function( $x, $y ) >= 0;
}, name => "my_function output is non-negative" ;
Property { ... }, name => "yet another property" ;
# more properties to check here
This module provides a simple (yet full featured) interface to LectroTest, an automated, specification-based testing system for Perl. To use it, declare properties that specify the expected behavior of your software. LectroTest then checks your software to see whether those properties hold.
Declare properties using the Property function, which takes a block of code and promotes it to a Test::LectroTest::Property:
Property {
##[ x <- Int, y <- Int ]##
MyModule::my_function( $x, $y ) >= 0;
}, name => "my_function output is non-negative" ;
The first part of the block must contain a generator-binding declaration. For example:
##[ x <- Int, y <- Int ]##
(Note the special bracketing, which is required.) This particular binding says, "For all integers x and y." (By the way, you arent limited to integers. LectroTest also gives you booleans, strings, lists, hashes, and more, and it lets you define your own generator types. See Test::LectroTest::Generator for more.)
The second part of the block is simply a snippet of code that makes use of the variables we bound earlier to test whether a property holds for the piece of software we are testing:
MyModule::my_function( $x, $y ) >= 0;
In this case, it asserts that MyModule::my_function($x,$y) returns a non-negative result. (Yes, $x and $y refer to the same x and y that we bound to the generators earlier. LectroTest automagically loads these lexically bound Perl variables with values behind the scenes.)
Test::LectroTest 0.3500 Screenshot
Test::LectroTest 0.3500 Keywords
LectroTest
LectroTest 0.3500
Perl module
property
module
Perl
tests
easy
properties
Test::LectroTest
TestLectroTest
Test::LectroTest 0.3500
Libraries
Programming
Bookmark Test::LectroTest 0.3500
Test::LectroTest 0.3500 Copyright
WareSeeker periodically updates pricing and software information of Test::LectroTest 0.3500 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::LectroTest 0.3500 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
electrotest
perl modules
install perl module
unclaimed property
installing perl module
xml parser perl module
atrpms perl module helper
perl module tutorial
property guys
module master
real estate property listings
rightmove property
lunar module
net ssleay perl module
property appraiser
module allows users
perl module install
community property states
Related Software
Test::LectroTest::Property is a Perl module with properties that make testable claims about your software. Free Download
Test::LectroTest::Tutorial is a Perl module that contains documentation on how to use LectroTest to test your software. Free Download
CPAN::Test::Others is a Perl module to include tests for other modules on CPAN. Free Download
Test::Differences Perl module contains test strings and data structures and show differences if not ok. Free Download
Test::Perl::Critic is a Perl module use Perl::Critic in test programs. Free Download
Acme::Tests is a Perl module to see how much do you know. Free Download
Test::WWW::Accessibility is a Perl module to test web pages for accessibility. Free Download
Text::Emoticon::GoogleTalk is a Perl module emoticon filter of GoogleTalk. Free Download
Latest Software
Popular Software
Favourite Software