Test::Float - Test::Harness modified to accept floating point test result values
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
~./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
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.
&runtests is exported by Test::Float by default.
$debug are exported upon request.
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.
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 <firstname.lastname@example.org>.
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.
perldoc float.pl for copyright terms and conditions for the
float.pl portion of this package.