Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d7f8597

Browse files
committed
Simplified test for task 120.
1 parent 6daf2d3 commit d7f8597

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

‎src/test/java/g0101_0200/s0120_triangle/SolutionTest.java

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,17 @@
33
import static org.hamcrest.CoreMatchers.equalTo;
44
import static org.hamcrest.MatcherAssert.assertThat;
55

6-
import java.util.ArrayList;
7-
import java.util.Arrays;
8-
import java.util.List;
6+
import com_github_leetcode.ArrayUtils;
97
import org.junit.Test;
108

119
public class SolutionTest {
1210
@Test
13-
public void triangle() {
14-
List<List<Integer>> input = new ArrayList<>();
15-
input.add(Arrays.asList(2));
16-
input.add(Arrays.asList(3, 4));
17-
input.add(Arrays.asList(6, 5, 7));
18-
input.add(Arrays.asList(4, 1, 8, 3));
19-
20-
assertThat(new Solution().minimumTotal(input), equalTo(11));
11+
public void minimumTotal() {
12+
assertThat(
13+
new Solution()
14+
.minimumTotal(
15+
ArrayUtils.getLists(
16+
new int[][] {{2}, {3, 4}, {6, 5, 7}, {4, 1, 8, 3}})),
17+
equalTo(11));
2118
}
2219
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /