mirror of
https://github.com/TheAlgorithms/Java.git
synced 2026-03-13 08:40:43 +08:00
style: enable MethodName in CheckStyle (#5182)
enabled: MethodName in CheckStyle
This commit is contained in:
committed by
GitHub
parent
ea4dc15a24
commit
295e7436b1
@@ -10,48 +10,48 @@ public class KadaneAlogrithmTest {
|
||||
@Test
|
||||
void testForOneElement() {
|
||||
int[] a = {-1};
|
||||
assertTrue(KadaneAlgorithm.max_Sum(a, -1));
|
||||
assertTrue(KadaneAlgorithm.maxSum(a, -1));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testForTwoElements() {
|
||||
int[] a = {-2, 1};
|
||||
assertTrue(KadaneAlgorithm.max_Sum(a, 1));
|
||||
assertTrue(KadaneAlgorithm.maxSum(a, 1));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testForThreeElements() {
|
||||
int[] a = {5, 3, 12};
|
||||
assertTrue(KadaneAlgorithm.max_Sum(a, 20));
|
||||
assertTrue(KadaneAlgorithm.maxSum(a, 20));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testForFourElements() {
|
||||
int[] a = {-1, -3, -7, -4};
|
||||
assertTrue(KadaneAlgorithm.max_Sum(a, -1));
|
||||
assertTrue(KadaneAlgorithm.maxSum(a, -1));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testForFiveElements() {
|
||||
int[] a = {4, 5, 3, 0, 2};
|
||||
assertTrue(KadaneAlgorithm.max_Sum(a, 14));
|
||||
assertTrue(KadaneAlgorithm.maxSum(a, 14));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testForSixElements() {
|
||||
int[] a = {-43, -45, 47, 12, 87, -13};
|
||||
assertTrue(KadaneAlgorithm.max_Sum(a, 146));
|
||||
assertTrue(KadaneAlgorithm.maxSum(a, 146));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testForSevenElements() {
|
||||
int[] a = {9, 8, 2, 23, 13, 6, 7};
|
||||
assertTrue(KadaneAlgorithm.max_Sum(a, 68));
|
||||
assertTrue(KadaneAlgorithm.maxSum(a, 68));
|
||||
}
|
||||
|
||||
@Test
|
||||
void testForEightElements() {
|
||||
int[] a = {9, -5, -5, -2, 4, 5, 0, 1};
|
||||
assertTrue(KadaneAlgorithm.max_Sum(a, 10));
|
||||
assertTrue(KadaneAlgorithm.maxSum(a, 10));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user