File tree Expand file tree Collapse file tree 5 files changed +13
-13
lines changed
src/test/java/algorithm/recursion Expand file tree Collapse file tree 5 files changed +13
-13
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ public void test() {
2121 List <String > actual = new ArrayList <>();
2222 actual .add ("(())" );
2323 actual .add ("()()" );
24- assertThat (actual , is ( 괄호경우의수구하기 (2 )));
24+ assertThat (괄호경우의수구하기 (2 ), is ( actual ));
2525 }
2626
2727 public List <String > 괄호경우의수구하기 (int n ) {
Original file line number Diff line number Diff line change @@ -14,12 +14,12 @@ public class Dice {
1414
1515 @ Test
1616 public void test () {
17- assertThat (4 , is ( calcDiceCase (3 )));
18- assertThat (8 , is ( calcDiceCase (4 )));
19- assertThat (16 , is ( calcDiceCase (5 )));
20- assertThat (32 , is ( calcDiceCase (6 )));
21- assertThat (63 , is ( calcDiceCase (7 )));
22- assertThat (125 , is ( calcDiceCase (8 )));
17+ assertThat (calcDiceCase (3 ), is ( 4 ));
18+ assertThat (calcDiceCase (4 ), is ( 8 ));
19+ assertThat (calcDiceCase (5 ), is ( 16 ));
20+ assertThat (calcDiceCase (6 ), is ( 32 ));
21+ assertThat (calcDiceCase (7 ), is ( 63 ));
22+ assertThat (calcDiceCase (8 ), is ( 125 ));
2323 }
2424
2525 public int calcDiceCase (int n ) {
Original file line number Diff line number Diff line change @@ -13,9 +13,9 @@ public class Fibonacci {
1313 */
1414 @ Test
1515 public void test () {
16- assertThat (5 , is (calcFibo ( 5 ) ));
17- assertThat (8 , is ( calcFibo (6 )));
18- assertThat (13 , is ( calcFibo (7 )));
16+ assertThat (calcFibo ( 5 ) , is (5 ));
17+ assertThat (calcFibo (6 ), is ( 8 ));
18+ assertThat (calcFibo (7 ), is ( 13 ));
1919 }
2020
2121 public int calcFibo (int num ) {
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public void test() {
2222 actual1 .add ("01" );
2323 actual1 .add ("10" );
2424 actual1 .add ("11" );
25- assertThat (actual1 , is ( calcBitCombination (2 )));
25+ assertThat (calcBitCombination (2 ), is ( actual1 ));
2626
2727 List <String > actual2 = new ArrayList <>();
2828 actual2 .add ("000" );
@@ -33,7 +33,7 @@ public void test() {
3333 actual2 .add ("101" );
3434 actual2 .add ("110" );
3535 actual2 .add ("111" );
36- assertThat (actual2 , is ( calcBitCombination (3 )));
36+ assertThat (calcBitCombination (3 ), is ( actual2 ));
3737 }
3838
3939 public List <String > calcBitCombination (int n ) {
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public void test() {
2525 actual .add ("231" );
2626 actual .add ("312" );
2727 actual .add ("321" );
28- assertThat (actual , is ( calcPermutation ("123" )));
28+ assertThat (calcPermutation ("123" ), is ( actual ));
2929 }
3030
3131 public List <String > calcPermutation (String str ) {
You can’t perform that action at this time.
0 commit comments