public function TimeEfficientImplementationTest::testSingleElementSubsequenceAtMiddle in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/sebastian/diff/tests/LCS/TimeEfficientImplementationTest.php \SebastianBergmann\Diff\LCS\TimeEfficientImplementationTest::testSingleElementSubsequenceAtMiddle()
File
- vendor/
sebastian/ diff/ tests/ LCS/ TimeEfficientImplementationTest.php, line 137
Class
- TimeEfficientImplementationTest
- Some of these tests are volontary stressfull, in order to give some approximative benchmark hints.
Namespace
SebastianBergmann\Diff\LCSCode
public function testSingleElementSubsequenceAtMiddle() {
foreach ($this->stress_sizes as $size) {
$from = range(1, $size);
$to = array_slice($from, (int) $size / 2, 1);
$common = $this->implementation
->calculate($from, $to);
$this
->assertEquals($to, $common);
}
}