Scott Walters > Test-Float-0.3 > Test::Float

Download:
Test-Float-0.3.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Module Version: 0.3   Source  

NAME ^

Test::Float - Test::Harness modified to accept floating point test result values

SYNOPSIS ^

  perl -MTest::Float -e 'Test::Float::test_harness(1, "blib/lib", "blib/arch")' t/*.t

But you probably don't want to use this module instead; instead, use float.pl or create something to replace it (after reading the docs in there).

Test::Float is a minor part of some stupid code that trains a Markov engine from Perl code then uses a simple genetic programming engine to write or modify code to pass fitness tests expressed as otherwise normal TAP style Perl tests that instead return floating point values. Test::Float is the minor part but it's the reusable part so the whole thing is named after it.

All of docs for the stupid Markov/genetic thing are in float.pl -- chdir to the build directory for this module (inside ~/.cpanm or ~./cpan or whatever) and do perldoc float.pl right now! You need to be in that directory or need stuff from that directory anyway.

  perl float.pl learn /path/to/some/code
  perl float.pl spew 20
  perl float.pl code

DESCRIPTION ^

One day, it occured to me that if tests returned floating point values to indicate to which degree the test was satisified, genetic programming could write your code for you. Test::Float implements the necessary monkey patches to Test::Harness to accept floating point values. Okay, monkey patching fell down on the v2 to v3 Test::Harness and I'm not eager to go rooting around through there again, so I've just copied the old code in. This is a modified version of an old Test::Harness.

The included float.pl script, upon different commands, programs a Markov Chains bot from example code and then runs generations of it with the floating point tests in t/*.t as the selection criteria for which programs die and which mutate and breed.

float.pl is sort of like prove in that it's a front-end to the test runner.

EXPORT ^

&runtests is exported by Test::Float by default.

$verbose, $switches and $debug are exported upon request.

HISTORY ^

0.1 was demo'd at Frozen Perl 2010.

0.2 was the first version released to CPAN.

0.3 fixes a die if you don't have a tmp directory in the current directory for diagnostic/debugging output. Oops. Also, permissions were wrong, as usual.

SEE ALSO ^

...

AUTHOR ^

Scott Walters, <scott@slowass.net>, adapted Test::Harness into being Test::Float.

Preserved from the Test::Harness documentation:

Either Tim Bunce or Andreas Koenig, we don't know. What we know for sure is, that it was inspired by Larry Wall's TEST script that came with perl distributions for ages. Numerous anonymous contributors exist. Andreas Koenig held the torch for many years, and then Michael G Schwern.

Current maintainer is Andy Lester <andy at petdance.com>.

If you're reading this and there's a bug, mail <scott@slowass.net>.

BUGS ^

float.pl COULD VERY EASILY QUASI-RANDOMLY GENERATE CODE THAT DELETES ALL OF YOUR DATA OR DOES OTHER VERY BAD THINGS. DO NOT USE THIS CODE WITHOUT PROPER PRECAUTIONS WHICH I CAN'T EVEN DESCRIBE.

COPYRIGHT AND LICENSE ^

Copyright (C) 2010 by Scott Walters

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.9 or, at your option, any later version of Perl 5 you may have available.

Copyright 2002-2005 by Michael G Schwern <schwern at pobox.com>, Andy Lester <andy at petdance.com>.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html.

See perldoc float.pl for copyright terms and conditions for the float.pl portion of this package.

syntax highlighting: