}
}
/** Tests the {@link Matrix#isSquare()} method. */
public void testIsSquare() {
assertTrue(new Matrix(20).isSquare());
assertTrue(new Matrix(1, 1).isSquare());
assertTrue(new Matrix(5, 5).isSquare());
assertTrue(new Matrix(8).isSquare());
assertFalse(new Matrix(1, 2).isSquare());
assertFalse(new Matrix(15, 14).isSquare());
double[][] data = new double[][] { { 1, 2, 3 }, { 4, 5, 6 } };
assertFalse(new Matrix(data).isSquare());
data = new double[][] { { 1, 2, 3 }, { 4, 5, 6 }, { 8, 7, 6 } };
assertTrue(new Matrix(data).isSquare());
}