Reduce range of IPv6 tested by testValidIPs
authorAntoine Musso <hashar@users.mediawiki.org>
Sun, 6 Feb 2011 20:24:53 +0000 (20:24 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sun, 6 Feb 2011 20:24:53 +0000 (20:24 +0000)
By using steps of 0xF, the number of assertions is reduced from 70k
to 5k revisions. It is not that useful to test all of them.

Follow up r76569

tests/phpunit/includes/IPTest.php

index 695c656..8f8741c 100644 (file)
@@ -102,7 +102,7 @@ class IPTest extends MediaWikiTestCase {
                                $this->assertTrue( IP::isValid( $ip ) , "$ip is a valid IPv4 address" );
                        }
                }
-               foreach ( range( 0x0, 0xFFFF ) as $i ) {
+               foreach ( range( 0x0, 0xFFFF, 0xF ) as $i ) {
                        $a = sprintf( "%04x", $i );
                        $b = sprintf( "%03x", $i );
                        $c = sprintf( "%02x", $i );