Skip to content

Commit ae15200

Browse files
committed
Added tests
1 parent f050eba commit ae15200

File tree

1 file changed

+49
-8
lines changed
  • src/test/kotlin/g3501_3600/s3543_maximum_weighted_k_edge_path

1 file changed

+49
-8
lines changed

src/test/kotlin/g3501_3600/s3543_maximum_weighted_k_edge_path/SolutionTest.kt

+49-8
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,74 @@ import org.junit.jupiter.api.Test
77
internal class SolutionTest {
88
@Test
99
fun maxWeight() {
10-
assertThat<Int>(
10+
assertThat(
1111
Solution().maxWeight(3, arrayOf<IntArray>(intArrayOf(0, 1, 1), intArrayOf(1, 2, 2)), 2, 4),
12-
equalTo<Int>(3),
12+
equalTo(3),
1313
)
1414
}
1515

1616
@Test
1717
fun maxWeight2() {
18-
assertThat<Int>(
18+
assertThat(
1919
Solution().maxWeight(3, arrayOf<IntArray>(intArrayOf(0, 1, 2), intArrayOf(0, 2, 3)), 1, 3),
20-
equalTo<Int>(2),
20+
equalTo(2),
2121
)
2222
}
2323

2424
@Test
2525
fun maxWeight3() {
26-
assertThat<Int>(
26+
assertThat(
2727
Solution().maxWeight(3, arrayOf<IntArray>(intArrayOf(0, 1, 6), intArrayOf(1, 2, 8)), 1, 6),
28-
equalTo<Int>(-1),
28+
equalTo(-1),
2929
)
3030
}
3131

3232
@Test
3333
fun maxWeight4() {
34-
assertThat<Int>(
34+
assertThat(
3535
Solution().maxWeight(3, arrayOf<IntArray>(intArrayOf(0, 1, 6), intArrayOf(1, 2, 8)), 0, 6),
36-
equalTo<Int>(0),
36+
equalTo(0),
37+
)
38+
}
39+
40+
@Test
41+
fun maxWeight5() {
42+
assertThat(
43+
Solution()
44+
.maxWeight(
45+
6,
46+
arrayOf<IntArray>(
47+
intArrayOf(0, 1, 10),
48+
intArrayOf(0, 2, 1),
49+
intArrayOf(1, 3, 2),
50+
intArrayOf(2, 3, 5),
51+
intArrayOf(3, 4, 5),
52+
intArrayOf(3, 5, 3),
53+
),
54+
3,
55+
12,
56+
),
57+
equalTo(11),
58+
)
59+
}
60+
61+
@Test
62+
fun maxWeight6() {
63+
assertThat(
64+
Solution()
65+
.maxWeight(
66+
5,
67+
arrayOf<IntArray>(
68+
intArrayOf(0, 1, 2),
69+
intArrayOf(0, 2, 3),
70+
intArrayOf(1, 3, 3),
71+
intArrayOf(2, 3, 1),
72+
intArrayOf(3, 4, 2),
73+
),
74+
3,
75+
7,
76+
),
77+
equalTo(6),
3778
)
3879
}
3980
}

0 commit comments

Comments
 (0)