From bd333e7fcf60382bfc74d01e79754c3d4345a05b Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Sun, 6 Feb 2011 20:24:53 +0000 Subject: [PATCH] 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 --- tests/phpunit/includes/IPTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ); -- 2.20.1