From a4d419c1abfcb7780a228caeec466ffb2b0fc5e7 Mon Sep 17 00:00:00 2001 From: Matthew Ellison Date: Mon, 7 Feb 2022 22:32:31 +0000 Subject: [PATCH] Created DoubleMatrix --- .../java/com/mattrixwv/matrix/TestIntegerMatrix.java | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/test/java/com/mattrixwv/matrix/TestIntegerMatrix.java b/src/test/java/com/mattrixwv/matrix/TestIntegerMatrix.java index 5b78031..c4ce60f 100644 --- a/src/test/java/com/mattrixwv/matrix/TestIntegerMatrix.java +++ b/src/test/java/com/mattrixwv/matrix/TestIntegerMatrix.java @@ -115,7 +115,7 @@ public class TestIntegerMatrix{ @Test public void testEquals(){ - //1x1; + //1x1 IntegerMatrix matrix = new IntegerMatrix(grid1); assertTrue("IntegerMatrix 1x1 failed equals IntegerMatrix", matrix.equals(matrix)); @SuppressWarnings("unlikely-arg-type") @@ -232,9 +232,8 @@ public class TestIntegerMatrix{ //1x1 //Set IntegerMatrix matrix = new IntegerMatrix(grid1); - IntegerMatrix correctMatrix = null; matrix.set(0, 0, 2); - correctMatrix = new IntegerMatrix(new int[][]{{2}}); + IntegerMatrix correctMatrix = new IntegerMatrix(new int[][]{{2}}); assertEquals("IntegerMatrix 1x1 failed set", correctMatrix, matrix); //SetRow matrix.setRow(0, new int[]{0}); @@ -381,9 +380,8 @@ public class TestIntegerMatrix{ //1x1 //AddRow IntegerMatrix matrix = new IntegerMatrix(grid1); - IntegerMatrix correctMatrix = null; matrix.addRow(new int[]{1}); - correctMatrix = new IntegerMatrix(new int[][]{{1}, {1}}); + IntegerMatrix correctMatrix = new IntegerMatrix(new int[][]{{1}, {1}}); assertEquals("IntegerMatrix 1x1 failed addRow", correctMatrix, matrix); //AddColumn matrix = new IntegerMatrix(grid1); @@ -400,7 +398,7 @@ public class TestIntegerMatrix{ {1, 2}, {1, 2} }); - assertEquals("IntegerMatrix 2x2 failed set row", correctMatrix, matrix); + assertEquals("IntegerMatrix 2x2 failed addRow", correctMatrix, matrix); //AddColumn matrix = new IntegerMatrix(grid2); matrix.addCol(new int[]{3, 3}); @@ -408,7 +406,7 @@ public class TestIntegerMatrix{ {1, 2, 3}, {1, 2, 3} }); - assertEquals("IntegerMatrix 2x2 failed set row", correctMatrix, matrix); + assertEquals("IntegerMatrix 2x2 failed addCol", correctMatrix, matrix); //3x3 //AddRow