Skip to content

Commit

Permalink
Improve tests for average array assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahsnider committed Jun 30, 2023
1 parent 65a6ed2 commit 014fd29
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions app/src/main/java/assignments/arrays1/AverageArray.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,8 @@ private static void testAverageArray(int[] arr, int expected) {
public static void main(String[] args) {
System.out.println("Function Call -> Expected | Yours | Pass?\n");
testAverageArray(new int[] {1, 2, 3, 4, 5}, 3);
testAverageArray(new int[] {1, 2, 3, 4, 5, 6}, 3);
testAverageArray(new int[] {1, 2, 3, 4, 5, 6, 7}, 4);
testAverageArray(new int[] {1, 2, 3, 4, 5, 6, 7, 8}, 4);
testAverageArray(new int[] {1, 2, 3, 4, 5, 6, 7, 8, 9}, 5);
testAverageArray(new int[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, 5);
testAverageArray(new int[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, 5);
testAverageArray(new int[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, 5);
testAverageArray(new int[] {3, 3, 3}, 3);
testAverageArray(new int[] {10, 20, 25}, 18);
testAverageArray(new int[] {50, 50, 0}, 33);
}
}

0 comments on commit 014fd29

Please sign in to comment.