mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-08-02 06:03:41 +08:00
@ -1,24 +1,24 @@
|
||||
package com.thealgorithms.dynamicprogramming;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class PartitionProblemTest {
|
||||
@Test
|
||||
public void testIfSumOfTheArrayIsOdd(){
|
||||
assertFalse(PartitionProblem.partition(new int[]{1, 2, 2}));
|
||||
public void testIfSumOfTheArrayIsOdd() {
|
||||
assertFalse(PartitionProblem.partition(new int[] {1, 2, 2}));
|
||||
}
|
||||
@Test
|
||||
public void testIfSizeOfTheArrayIsOne(){
|
||||
assertFalse(PartitionProblem.partition(new int[]{2}));
|
||||
public void testIfSizeOfTheArrayIsOne() {
|
||||
assertFalse(PartitionProblem.partition(new int[] {2}));
|
||||
}
|
||||
@Test
|
||||
public void testIfSumOfTheArrayIsEven1(){
|
||||
assertTrue(PartitionProblem.partition(new int[]{1, 2, 3, 6}));
|
||||
public void testIfSumOfTheArrayIsEven1() {
|
||||
assertTrue(PartitionProblem.partition(new int[] {1, 2, 3, 6}));
|
||||
}
|
||||
@Test
|
||||
public void testIfSumOfTheArrayIsEven2(){
|
||||
assertFalse(PartitionProblem.partition(new int[]{1, 2, 3, 8}));
|
||||
public void testIfSumOfTheArrayIsEven2() {
|
||||
assertFalse(PartitionProblem.partition(new int[] {1, 2, 3, 8}));
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user