Ejemplo n.º 1
0
 public function testToString()
 {
     $matrix = new ByteMatrix(3, 3);
     $matrix->set(0, 0, 0);
     $matrix->set(1, 0, 1);
     $matrix->set(2, 0, 0);
     $matrix->set(0, 1, 1);
     $matrix->set(1, 1, 0);
     $matrix->set(2, 1, 1);
     $matrix->set(0, 2, -1);
     $matrix->set(1, 2, -1);
     $matrix->set(2, 2, -1);
     $expected = " 0 1 0\n 1 0 1\n      \n";
     $this->assertEquals($expected, $matrix->__toString());
 }