tests/Lists/CircularLinkedListTest.php 1 location
|
@@ 13-18 (lines=6) @@
|
| 10 |
|
$this->list = new CircularLinkedList(); |
| 11 |
|
} |
| 12 |
|
|
| 13 |
|
public function testSize() { |
| 14 |
|
$this->assertEquals($this->list->size(), 0); |
| 15 |
|
$this->list->push(true); |
| 16 |
|
$this->list->push(2); |
| 17 |
|
$this->assertEquals($this->list->size(), 2); |
| 18 |
|
} |
| 19 |
|
|
| 20 |
|
public function testEmpty() { |
| 21 |
|
$this->assertTrue($this->list->empty()); |
tests/Lists/DoublyLinkedListTest.php 1 location
|
@@ 13-18 (lines=6) @@
|
| 10 |
|
$this->list = new DoublyLinkedList(); |
| 11 |
|
} |
| 12 |
|
|
| 13 |
|
public function testSize() { |
| 14 |
|
$this->assertEquals($this->list->size(), 0); |
| 15 |
|
$this->list->push(true); |
| 16 |
|
$this->list->push(2); |
| 17 |
|
$this->assertEquals($this->list->size(), 2); |
| 18 |
|
} |
| 19 |
|
|
| 20 |
|
public function testEmpty() { |
| 21 |
|
$this->assertTrue($this->list->empty()); |
tests/Lists/ArrayListTest.php 1 location
|
@@ 13-18 (lines=6) @@
|
| 10 |
|
$this->list = new ArrayList(); |
| 11 |
|
} |
| 12 |
|
|
| 13 |
|
public function testSize() { |
| 14 |
|
$this->assertEquals($this->list->size(), 0); |
| 15 |
|
$this->list->push(true); |
| 16 |
|
$this->list->push(2); |
| 17 |
|
$this->assertEquals($this->list->size(), 2); |
| 18 |
|
} |
| 19 |
|
|
| 20 |
|
public function testEmpty() { |
| 21 |
|
$this->assertTrue($this->list->empty()); |
tests/Trees/TrieTreeTest.php 1 location
|
@@ 14-20 (lines=7) @@
|
| 11 |
|
$this->tree = new TrieTree(); |
| 12 |
|
} |
| 13 |
|
|
| 14 |
|
public function testAdd() { |
| 15 |
|
$this->tree->add('hello'); |
| 16 |
|
$this->tree->add('bye'); |
| 17 |
|
$this->assertEquals(8, $this->tree->size()); |
| 18 |
|
$this->tree->add('hello'); |
| 19 |
|
$this->assertEquals(8, $this->tree->size()); |
| 20 |
|
} |
| 21 |
|
|
| 22 |
|
public function testWordCount() { |
| 23 |
|
$this->tree->add('hello'); |