Skip to content

Commit

Permalink
fix 12
Browse files Browse the repository at this point in the history
  • Loading branch information
anakettl committed Mar 1, 2021
1 parent a25854a commit 4f46f29
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/test/java/edu/ifrs/vvs/BubbleSortTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,24 @@ void arraySimpleSort() {
bs.sort(arrayTest);
assertArrayEquals(arrayTest, arrayExpected);
}

@Test
@SuppressWarnings("checkstyle:magicnumber")
void arrayWithNegativesSort() {
int[] arrayTest = new int[] {-1, 2, 0, 23, 1, -2};
int[] arrayExpected = new int[] {-2, -1, 0, 1, 2, 23};

bs.sort(arrayTest);
assertArrayEquals(arrayTest, arrayExpected);
}

@Test
@SuppressWarnings("checkstyle:magicnumber")
void arrayEmptySort() {
int[] arrayTest = new int[] {-1, 2, 0, 23, 1, -2};
int[] arrayExpected = new int[] {-2, -1, 0, 1, 2, 23};

bs.sort(arrayTest);
assertArrayEquals(arrayTest, arrayExpected);
}
}

0 comments on commit 4f46f29

Please sign in to comment.