Skip to content

Commit

Permalink
test: add test case
Browse files Browse the repository at this point in the history
- all negative value
  • Loading branch information
rldnrl committed Nov 26, 2022
1 parent b045a76 commit 48cb14c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/leetcode/MaximumSubarrayTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,9 @@ void maximumSubarrayWithSlidingWindow() {
int[] nums3 = new int[]{5,4,-1,7,8};
int result3 = 23;
Assertions.assertEquals(MaximumSubarray.maxSubarrayWithSlidingWindow(nums3), result3);

int[] nums4 = new int[]{-5, -4,-1, -7, -8};
int result4 = -1;
Assertions.assertEquals(MaximumSubarray.maxSubarrayWithSlidingWindow(nums4), result4);
}
}

0 comments on commit 48cb14c

Please sign in to comment.