@@ -57,7 +57,7 @@ public void testEditDistance_OneEmptyString_Memoization() {
5757 int [][] storage = new int [1 ][6 ];
5858 assertAll ("String assertions" ,
5959 ()
60- -> assertEquals (5 , EditDistance .editDistance ("" , "hello" , storage )),
60+ -> assertEquals (5 , EditDistance .editDistance ("" , "hello" , storage )),
6161 () -> assertEquals (0 , storage [0 ][0 ]), () -> assertEquals (0 , storage [0 ][1 ]), () -> assertEquals (0 , storage [0 ][2 ]), () -> assertEquals (0 , storage [0 ][3 ]), () -> assertEquals (0 , storage [0 ][4 ]), () -> assertEquals (5 , storage [0 ][5 ]));
6262 }
6363
@@ -72,27 +72,26 @@ public void testEditDistance_EqualStrings_Memoization() {
7272 int [][] storage = new int [4 ][4 ];
7373 assertAll ("String assertions" ,
7474 ()
75- -> assertEquals (0 , EditDistance .editDistance ("abc" , "abc" , storage )),
75+ -> assertEquals (0 , EditDistance .editDistance ("abc" , "abc" , storage )),
7676 ()
77- -> assertEquals (0 , storage [0 ][0 ]),
77+ -> assertEquals (0 , storage [0 ][0 ]),
7878 ()
79- -> assertEquals (0 , storage [0 ][1 ]),
79+ -> assertEquals (0 , storage [0 ][1 ]),
8080 ()
81- -> assertEquals (0 , storage [0 ][2 ]),
81+ -> assertEquals (0 , storage [0 ][2 ]),
8282 ()
83- -> assertEquals (0 , storage [0 ][3 ]),
83+ -> assertEquals (0 , storage [0 ][3 ]),
8484 ()
85- -> assertEquals (0 , storage [1 ][0 ]),
85+ -> assertEquals (0 , storage [1 ][0 ]),
8686 ()
87- -> assertEquals (0 , storage [1 ][1 ]),
87+ -> assertEquals (0 , storage [1 ][1 ]),
8888 ()
89- -> assertEquals (0 , storage [1 ][2 ]),
89+ -> assertEquals (0 , storage [1 ][2 ]),
9090 ()
91- -> assertEquals (0 , storage [1 ][3 ]),
91+ -> assertEquals (0 , storage [1 ][3 ]),
9292 ()
93- -> assertEquals (0 , storage [2 ][0 ]),
94- () -> assertEquals (0 , storage [2 ][1 ]), () -> assertEquals (0 , storage [2 ][2 ]), () -> assertEquals (0 , storage [2 ][3 ]), () -> assertEquals (0 , storage [3 ][0 ]), () -> assertEquals (0 , storage [3 ][1 ]), () -> assertEquals (0 , storage [3 ][2 ]), () -> assertEquals (0 , storage [3 ][3 ])
95- );
93+ -> assertEquals (0 , storage [2 ][0 ]),
94+ () -> assertEquals (0 , storage [2 ][1 ]), () -> assertEquals (0 , storage [2 ][2 ]), () -> assertEquals (0 , storage [2 ][3 ]), () -> assertEquals (0 , storage [3 ][0 ]), () -> assertEquals (0 , storage [3 ][1 ]), () -> assertEquals (0 , storage [3 ][2 ]), () -> assertEquals (0 , storage [3 ][3 ]));
9695 }
9796
9897 @ Test
@@ -112,8 +111,7 @@ public void testEditDistance_OneCharacterDifference_Memoization() {
112111 -> assertEquals (0 , storage [0 ][0 ]),
113112 ()
114113 -> assertEquals (1 , storage [0 ][1 ]),
115- () -> assertEquals (2 , storage [0 ][2 ]), () -> assertEquals (1 , storage [1 ][0 ]), () -> assertEquals (0 , storage [1 ][1 ]), () -> assertEquals (1 , storage [1 ][2 ]), () -> assertEquals (2 , storage [2 ][0 ]), () -> assertEquals (1 , storage [2 ][1 ]), () -> assertEquals (1 , storage [2 ][2 ])
116- );
114+ () -> assertEquals (2 , storage [0 ][2 ]), () -> assertEquals (1 , storage [1 ][0 ]), () -> assertEquals (0 , storage [1 ][1 ]), () -> assertEquals (1 , storage [1 ][2 ]), () -> assertEquals (2 , storage [2 ][0 ]), () -> assertEquals (1 , storage [2 ][1 ]), () -> assertEquals (1 , storage [2 ][2 ]) );
117115 }
118116
119117 @ Test
0 commit comments