Exemplo n.º 1
0
 public function testScenario1()
 {
     $entry = new MapEntry('a', 0);
     $this->assertEquals('a', $entry->getKey());
     $this->assertEquals(0, $entry->getValue());
     $entry = new MapEntry('b', 1);
     $this->assertEquals('b', $entry->getKey());
     $this->assertEquals(1, $entry->getValue());
 }
Exemplo n.º 2
0
 public static function compare(MapEntry $a, MapEntry $b)
 {
     return ord($a->getKey()) - ord($b->getKey());
 }