Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
HFTSoftwareProject
testcases
Commits
643cd1d3
Commit
643cd1d3
authored
Sep 24, 2024
by
Younis
Browse files
Add new file BubblesortTest
parent
4e6aa580
Changes
1
Hide whitespace changes
Inline
Side-by-side
BubbleSortTest
0 → 100644
View file @
643cd1d3
import static org.junit.Assert.assertArrayEquals;
import org.junit.Test;
public class BubbleSortTest{
@Test
public void testBubbleSortStudent1() {
int[] inputArray = {5, 90, 35, 150, 45, 3};
int[] expectedOutput = {3, 5, 35, 45, 90, 150};
BubbleSortStudent1.sort(inputArray);
assertArrayEquals(expectedOutput, inputArray);
}
@Test
public void testBubbleSortStudent2() {
int[] inputArray = {5, 90, 35, 150, 45, 3};
int[] expectedOutput = {3, 5, 35, 45, 90, 150};
BubbleSortStudent2.sort(inputArray);
assertArrayEquals(expectedOutput, inputArray);
}
@Test
public void testBubbleSortStudent3() {
int[] inputArray = {5, 90, 35, 150, 45, 3};
int[] expectedOutput = {3, 5, 35, 45, 90, 150};
BubbleSortStudent3.sort(inputArray);
assertArrayEquals(expectedOutput, inputArray);
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment