Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Oh! Seems like I should have fiddled more ...

I built a little on my square example, and made this trivial snippet.

#! /usr/bin/perl use Test::LectroTest; use Test::Deep; sub square { my $square = $_[ 0 ] * $_[ 0 ]; return [ $square, $square ]; } Property { ##[ x <- Int #]## my $sq = $x * $x; eq_deeply( square( $x ), [ $sq, $sq ] ); }, name => "Finding \$x's square. Twice!";

This passes, and gives the normal output of:

c:/dev/fun $ perl 1..1 ok 1 - 'Finding $x's square. Twice!' (1000 attempts)

Not enough research on my part evidently. My bad. At least it answers my original question. Yes, you can use other testing modules with Test::LectroTest :)

But if I try the same with Test::Differences (by changing Test::Deep to Test::Differences and swapping eq_or_diff with eq_deeply), I get the following:

c:/dev/fun $ perl 1..1 Can't identify test lib in use, doesn't seem to be or Test::Bu +ilder based at c:/perl/site/lib/Test/ line 409 Test::Differences::eq_or_diff('ARRAY(0x11c9fec)', 'ARRAY(0x11c9fe0 +)') called at line 15 main::__ANON__('Test::LectroTest::TestRunner::testcontroller=ARRAY +(0x11c9fb0)', 1) called at c:/perl/site/lib/Test/LectroTest/TestRunne line 196 eval {...} called at c:/perl/site/lib/Test/LectroTest/TestRunner.p +m line 193 Test::LectroTest::TestRunner::run('Test::LectroTest::TestRunner=HA +SH(0x1263fbc)', 'Test::LectroTest::Property=HASH(0x11c9f68)') called +at c:/perl/site/lib/Test/LectroTest/ line 289 Test::LectroTest::TestRunner::run_suite('Test::LectroTest::TestRun +ner=HASH(0x1263fbc)', 'Test::LectroTest::Property=HASH(0x11c9f68)') c +alled at c:/perl/site/lib/Test/ line 157 Test::LectroTest::run() called at c:/perl/site/lib/Test/LectroTest line 160 Test::LectroTest::END() called at line 0 eval {...} called at line 0 ok ok ok . . . # Followed by 997 more ok's

Looks like this is something related to how Test::Differences reports results. A Test::Builder issue, perhaps? I'll have a look into the code and see if I can figure something out.

Thanks for the quick reply, fergal, and for pointing me in the right direction.

Mischief. Mayhem. Soap.

In reply to Re^2: Can I use Test::Differences with Test::LectroTest? by pernod
in thread Can I use Test::Differences with Test::LectroTest? by pernod

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others avoiding work at the Monastery: (5)
    As of 2019-09-19 23:48 GMT
    Find Nodes?
      Voting Booth?
      The room is dark, and your next move is ...

      Results (253 votes). Check out past polls.