public function testRowAndColRangeOver() { $matrix = new Matrix(6, 3); // make sure set registers error on under-bound row try { $matrix->set(6, 0, 1); $this->assertTrue(false); // should have thrown an exception } catch (MatrixError $e) { } // make sure set registers error on under-bound col try { $matrix->set(0, 3, 1); $this->assertTrue(false); // should have thrown an exception } catch (MatrixError $e) { } // make sure get registers error on under-bound row try { $matrix->get(6, 0); $this->assertTrue(false); // should have thrown an exception } catch (MatrixError $e) { } // make sure set registers error on under-bound col try { $matrix->get(0, 3); $this->assertTrue(false); // should have thrown an exception } catch (MatrixError $e) { } }