Nicholas Clark (via RT) wrote:
It seems that the test is trying to count the number of times the libc
qsort calls the compare function. This doesn't seem like a fantastically
portable idea.

I'm not sure of the easiest way to re-write the test to expect that value to
be non-zero, which seems like the only safe thing to check.

See attached patch, which changes the test to use output_like instead of output_is. I really wish qr// worked with heredocs...


--
Brent "Dax" Royal-Gordon <[EMAIL PROTECTED]>
Perl and Parrot hacker

Oceania has always been at war with Eastasia.
? fixedbooleanarray.pmc
? patch.txt
? test.imc
? icu/source/test/testdata/out
? src/py_func.str
Index: t/pmc/fixedpmcarray.t
===================================================================
RCS file: /cvs/public/parrot/t/pmc/fixedpmcarray.t,v
retrieving revision 1.2
diff -u -r1.2 fixedpmcarray.t
--- t/pmc/fixedpmcarray.t       12 Jul 2004 15:28:23 -0000      1.2
+++ t/pmc/fixedpmcarray.t       12 Jul 2004 22:49:47 -0000
@@ -263,7 +263,7 @@
 ok 4
 OUTPUT
 
-output_is(<<'CODE', <<'OUTPUT', "sort");
+output_like(<<'CODE',
 ##PIR##
 .sub main @MAIN
      .local pmc compares
@@ -325,12 +325,12 @@
     .pcc_end_return
 .end
 CODE
-ok 1
+
+qr/ok 1
 1 2 5 9 10 x
 compares: 0
 ok 1
 1 2 5 9 10 x
-compares: 8
-OUTPUT
+compares: [1-9]\d*/, "sort");
 
 1;

Reply via email to