-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPalindromicSubstringFinderTest.java
More file actions
107 lines (90 loc) · 3.5 KB
/
Copy pathPalindromicSubstringFinderTest.java
File metadata and controls
107 lines (90 loc) · 3.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
package uk.jasonng.algoexpert.strings;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class PalindromicSubstringFinderTest {
private final PalindromicSubstringFinder palindromicSubstringFinder = new PalindromicSubstringFinder();
@Test
public void TestCase1() {
String input = "abaxyzzyxf", output = "xyzzyx", result;
result = palindromicSubstringFinder.longestPalindromicSubstring(input);
assertEquals(result, output);
}
@Test
public void TestCase2() {
String input = "a", output = "a", result;
result = palindromicSubstringFinder.longestPalindromicSubstring(input);
assertEquals(result, output);
}
@Test
public void TestCase3() {
String input = "it's highnoon", output = "noon", result;
result = palindromicSubstringFinder.longestPalindromicSubstring(input);
assertEquals(result, output);
}
@Test
public void TestCase4() {
String input = "noon high it is", output = "noon", result;
result = palindromicSubstringFinder.longestPalindromicSubstring(input);
assertEquals(result, output);
}
@Test
public void TestCase5() {
String input = "abccbait's highnoon", output = "abccba", result;
result = palindromicSubstringFinder.longestPalindromicSubstring(input);
assertEquals(result, output);
}
@Test
public void TestCase6() {
String input = "abcdefgfedcbazzzzzzzzzzzzzzzzzzzz", output = "zzzzzzzzzzzzzzzzzzzz", result;
result = palindromicSubstringFinder.longestPalindromicSubstring(input);
assertEquals(result, output);
}
@Test
public void TestCase7() {
String input = "abcdefgfedcba", output = "abcdefgfedcba", result;
result = palindromicSubstringFinder.longestPalindromicSubstring(input);
assertEquals(result, output);
}
@Test
public void TestCase8() {
String input = "abcdefghfedcbaa", output = "aa", result;
result = palindromicSubstringFinder.longestPalindromicSubstring(input);
assertEquals(result, output);
}
@Test
public void TestCase9() {
String input = "abcdefggfedcba", output = "abcdefggfedcba", result;
result = palindromicSubstringFinder.longestPalindromicSubstring(input);
assertEquals(result, output);
}
@Test
public void TestCase10() {
String input = "zzzzzzz2345abbbba5432zzbbababa", output = "zz2345abbbba5432zz", result;
result = palindromicSubstringFinder.longestPalindromicSubstring(input);
assertEquals(result, output);
}
@Test
public void TestCase11() {
String input = "z234a5abbbba54a32z", output = "5abbbba5", result;
result = palindromicSubstringFinder.longestPalindromicSubstring(input);
assertEquals(result, output);
}
@Test
public void TestCase12() {
String input = "z234a5abbba54a32z", output = "5abbba5", result;
result = palindromicSubstringFinder.longestPalindromicSubstring(input);
assertEquals(result, output);
}
@Test
public void TestCase13() {
String input = "ab12365456321bb", output = "b12365456321b", result;
result = palindromicSubstringFinder.longestPalindromicSubstring(input);
assertEquals(result, output);
}
@Test
public void TestCase14() {
String input = "aca", output = "aca", result;
result = palindromicSubstringFinder.longestPalindromicSubstring(input);
assertEquals(result, output);
}
}