in reply to Can I use Test::Differences with Test::LectroTest?

The problem is that ok() is tied to the Test::Builder testing and reporting harness and LectroTest uses a different underlying harness because of all the trials it does. (Maybe I should investigate integration?)

Anyway, if you want to use Test::Builder-based modules for their testing features and not for their harness features (which is the case when you are using them inside of LectroTest properties), you can (hackishly) redefine Test::Builder's ok() method to simply return the result status without doing anything else.

Using Test::More for the example:

use warnings; use strict; use Test::More; use Test::LectroTest; { no warnings; sub Test::Builder::ok { $_[1] ? 1 : 0 } # redefine ok() } Property { ##[ x <- Int( range=>[0,10] ) ]## cmp_ok( $x, '>=', 0, "" ); }, name => "cmp_ok() works with LectroTest";

Testing it out:

$ perl pm-lectrotest-testbuilder.pl 1..1 ok 1 - 'cmp_ok() works with LectroTest' (1000 attempts)

I hope that this helps.

Cheers,
Tom