more tests for libphp - incorporate lonvias feedback

This commit is contained in:
Marc Tobias Metten
2015-10-15 02:28:16 +02:00
parent 10a965c3ab
commit 111444cd99
2 changed files with 6 additions and 4 deletions

View File

@@ -128,8 +128,10 @@ class NominatimTest extends \PHPUnit_Framework_TestCase
// 4 words => 8 sets // 4 words => 8 sets
// 10 words => 511 sets // 10 words => 511 sets
// 15 words => 12911 sets // 15 words => 12911 sets
// 18 words => 65536 sets
// 20 words => 169766 sets // 20 words => 169766 sets
// 28 words => 397594 sets // 22 words => 401930 sets
// 28 words => 3505699 sets (needs more than 4GB via 'phpunit -d memory_limit=' to run)
$this->assertEquals( $this->assertEquals(
8, 8,
count( getWordSets(array_fill( 0, 4, 'a'),0) ) count( getWordSets(array_fill( 0, 4, 'a'),0) )
@@ -137,8 +139,8 @@ class NominatimTest extends \PHPUnit_Framework_TestCase
$this->assertEquals( $this->assertEquals(
8, 65536,
count( getWordSets(array_fill( 0, 28, 'a'),0) ) count( getWordSets(array_fill( 0, 18, 'a'),0) )
); );

View File

@@ -7,7 +7,7 @@ installed.
To execute the test suite run To execute the test suite run
$ cd tests-php $ cd tests-php
$ phpunit $ phpunit ./
It will read phpunit.xml which points to the library, test path, bootstrap It will read phpunit.xml which points to the library, test path, bootstrap
strip and set other parameters. strip and set other parameters.