We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a3baa4e commit fd3c713Copy full SHA for fd3c713
tests/StackQueue/StackSetTest.php
@@ -18,4 +18,18 @@ public function testStackSet() {
18
$this->assertTrue($element === "Hallo 3");
19
$this->assertTrue($stackSet->stackCount() === 1);
20
}
21
+
22
+ public function testHugeStackSet() {
23
+ $setSize = 1024;
24
+ $factor = 4;
25
+ $stackSet = new StackSet(1024);
26
+ for ($i = 0; $i < $setSize * $factor; $i++) {
27
+ $stackSet->push($i);
28
+ }
29
+ $this->assertTrue($stackSet->stackCount() === $factor);
30
+ for ($i = 0; $i < $setSize + 1; $i++) {
31
+ $stackSet->pop();
32
33
+ $this->assertTrue($stackSet->stackCount() === 3);
34
35
0 commit comments