|
1 | 1 | package g3401_3500.s3470_permutations_iv |
2 | 2 |
|
3 | | -import org.hamcrest.CoreMatchers |
4 | | -import org.hamcrest.MatcherAssert |
| 3 | +import org.hamcrest.CoreMatchers.equalTo |
| 4 | +import org.hamcrest.MatcherAssert.assertThat |
5 | 5 | import org.junit.jupiter.api.Test |
6 | 6 |
|
7 | 7 | internal class SolutionTest { |
8 | 8 | @Test |
9 | 9 | fun permute() { |
10 | | - MatcherAssert.assertThat<IntArray?>( |
| 10 | + assertThat<IntArray>( |
11 | 11 | Solution().permute(4, 6L), |
12 | | - CoreMatchers.equalTo<IntArray?>(intArrayOf(3, 4, 1, 2)), |
| 12 | + equalTo<IntArray>(intArrayOf(3, 4, 1, 2)), |
13 | 13 | ) |
14 | 14 | } |
15 | 15 |
|
16 | 16 | @Test |
17 | 17 | fun permute2() { |
18 | | - MatcherAssert.assertThat<IntArray?>( |
| 18 | + assertThat<IntArray>( |
19 | 19 | Solution().permute(3, 2L), |
20 | | - CoreMatchers.equalTo<IntArray?>(intArrayOf(3, 2, 1)), |
| 20 | + equalTo<IntArray>(intArrayOf(3, 2, 1)), |
21 | 21 | ) |
22 | 22 | } |
23 | 23 |
|
24 | 24 | @Test |
25 | 25 | fun permute3() { |
26 | | - MatcherAssert.assertThat<IntArray?>(Solution().permute(2, 3L), CoreMatchers.equalTo<IntArray?>(intArrayOf())) |
| 26 | + assertThat<IntArray>(Solution().permute(2, 3L), equalTo<IntArray>(intArrayOf())) |
27 | 27 | } |
28 | 28 |
|
29 | 29 | @Test |
30 | 30 | fun permute4() { |
31 | | - MatcherAssert.assertThat<IntArray?>( |
| 31 | + assertThat<IntArray>( |
32 | 32 | Solution().permute(43, 142570305460935L), |
33 | | - CoreMatchers.equalTo<IntArray?>( |
| 33 | + equalTo<IntArray>( |
34 | 34 | intArrayOf( |
35 | 35 | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, |
36 | 36 | 21, 22, 43, 40, 27, 36, 25, 34, 31, 32, 29, 28, 33, 24, 23, 26, 41, 42, |
|
0 commit comments