http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89027
Revision: 89027
Author: hashar
Date: 2011-05-28 08:38:14 +0000 (Sat, 28 May 2011)
Log Message:
-----------
Only run CleanUpTest on a quarter of the cases.
Speed up the testDoubleBytes & testTripleBytes which generates 32k assertions.
The processing took 12 and 18 seconds respectively on my computer, now down
to 8k assertions.
Modified Paths:
--------------
trunk/phase3/tests/phpunit/includes/normal/CleanUpTest.php
Modified: trunk/phase3/tests/phpunit/includes/normal/CleanUpTest.php
===================================================================
--- trunk/phase3/tests/phpunit/includes/normal/CleanUpTest.php 2011-05-28
08:14:33 UTC (rev 89026)
+++ trunk/phase3/tests/phpunit/includes/normal/CleanUpTest.php 2011-05-28
08:38:14 UTC (rev 89027)
@@ -140,8 +140,8 @@
* @todo document
*/
function doTestDoubleBytes( $head, $tail ) {
- for( $first = 0xc0; $first < 0x100; $first++ ) {
- for( $second = 0x80; $second < 0x100; $second++ ) {
+ for( $first = 0xc0; $first < 0x100; $first+=2 ) {
+ for( $second = 0x80; $second < 0x100; $second+=2 ) {
$char = $head . chr( $first ) . chr( $second )
. $tail;
$clean = UtfNormal::cleanUp( $char );
$x = sprintf( "%02X,%02X", $first, $second );
@@ -184,8 +184,8 @@
/** @todo document */
function doTestTripleBytes( $head, $tail ) {
- for( $first = 0xc0; $first < 0x100; $first++ ) {
- for( $second = 0x80; $second < 0x100; $second++ ) {
+ for( $first = 0xc0; $first < 0x100; $first+=2 ) {
+ for( $second = 0x80; $second < 0x100; $second+=2 ) {
#for( $third = 0x80; $third < 0x100; $third++ )
{
for( $third = 0x80; $third < 0x81; $third++ ) {
$char = $head . chr( $first ) . chr(
$second ) . chr( $third ) . $tail;
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs