JavaAlgorithms/DynamicProgramming/LongestPalindromicSubsequenceTests.java

34 lines
660 B
Java
Raw Normal View History

2020-10-11 00:07:03 +08:00
package test;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Test;
class LongestPalindromicSubsequenceTests {
@Test
void test1() {
assertEquals(LongestPalindromicSubsequence.LPS(""), "");
}
@Test
void test2() {
assertEquals(LongestPalindromicSubsequence.LPS("A"), "A");
}
@Test
void test3() {
assertEquals(LongestPalindromicSubsequence.LPS("BABCBAB"), "BABCBAB");
}
@Test
void test4() {
assertEquals(LongestPalindromicSubsequence.LPS("BBABCBCAB"), "BABCBAB");
}
@Test
void test5() {
assertEquals(LongestPalindromicSubsequence.LPS("AAAAAAAAAAAAAAAAAAAAAAAA"), "AAAAAAAAAAAAAAAAAAAAAAAA");
}
}