From: Antoine Musso Date: Sun, 6 Feb 2011 20:24:53 +0000 (+0000) Subject: Reduce range of IPv6 tested by testValidIPs X-Git-Tag: 1.31.0-rc.0~32159 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=bd333e7fcf60382bfc74d01e79754c3d4345a05b;p=lhc%2Fweb%2Fwiklou.git Reduce range of IPv6 tested by testValidIPs 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 --- diff --git a/tests/phpunit/includes/IPTest.php b/tests/phpunit/includes/IPTest.php index 695c656979..8f8741cdbf 100644 --- a/tests/phpunit/includes/IPTest.php +++ b/tests/phpunit/includes/IPTest.php @@ -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 );