Skip to content

Commit

Permalink
Fix ArrayModeInPlaceSnippetTest
Browse files Browse the repository at this point in the history
  • Loading branch information
XieGuochao committed May 23, 2024
1 parent bdd2ac7 commit e19ad1f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/test/java/array/ArrayModeInPlaceSnippetTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
*/
public class ArrayModeInPlaceSnippetTest {
/**
* Test for {@link ArrayModeSnippet #ArrayModeSnippet(int[])}.
* Test for {@link ArrayModeInPlaceSnippet #ArrayModeInPlaceSnippet(int[])}.
*/
@Test
void testModeArray() {
assertEquals(2, ArrayModeSnippet.modeArray(new int[]{1, 2, 3, 2, 4, 2, 2}));
assertEquals(-8, ArrayModeSnippet.modeArray(new int[]{-43, -8, -8, -10, -8, -65, -9}));
assertEquals(0, ArrayModeSnippet.modeArray(new int[]{-4, 0, -2, -1, 0}));
assertEquals(1, ArrayModeSnippet.modeArray(new int[]{1, 1, 1, 1, 1, 1}));
assertEquals(2, ArrayModeInPlaceSnippet.modeArrayInPlace(new int[]{1, 2, 3, 2, 4, 2, 2}));
assertEquals(-8, ArrayModeInPlaceSnippet.modeArrayInPlace(new int[]{-43, -8, -8, -10, -8, -65, -9}));
assertEquals(0, ArrayModeInPlaceSnippet.modeArrayInPlace(new int[]{-4, 0, -2, -1, 0}));
assertEquals(1, ArrayModeInPlaceSnippet.modeArrayInPlace(new int[]{1, 1, 1, 1, 1, 1}));
}
}

0 comments on commit e19ad1f

Please sign in to comment.