This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
mktables: Add a little stress to the tests
authorKarl Williamson <public@khwilliamson.com>
Sat, 19 Nov 2011 21:37:35 +0000 (14:37 -0700)
committerKarl Williamson <public@khwilliamson.com>
Fri, 13 Jan 2012 16:58:32 +0000 (09:58 -0700)
This simply reverses the sort order so that the generated tests
use the highest ranges instead of the lowest, making it less likely that
tests will pass by chance; and also increasing performance issues in
finding matches.

lib/unicore/mktables

index 03f122b..92f9d87 100644 (file)
@@ -4434,7 +4434,7 @@ sub trace { return main::trace(@_); }
         for my $try_hard (0, 1) {
 
             # Look through all the ranges for a usable code point.
-            for my $set ($self->ranges) {
+            for my $set (reverse $self->ranges) {
 
                 # Try the edge cases first, starting with the end point of the
                 # range.