Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Tests for LongestPalindromeSubcsting
import org.junit.Test;
import static org.junit.Assert.*;
public class PalindromeSubstringTest {
@Test
public void testPalindrome() {
String s1 = "арозаупаланалапуазора";
assertEquals("арозаупаланалапуазора", PalindromeSubstring.getLongestPalindrome(s1));
String s2 = "чтотебенадомальчикэтоядяддядя";
assertEquals("ядяддядя", PalindromeSubstring.getLongestPalindrome(s2));
String s3 = "тебяфенязовутнетянефеняактотытогда";
assertEquals("янефеня", PalindromeSubstring.getLongestPalindrome(s3));
String s4 = "влесускрипелиромикикикимор";
assertEquals("ромикикикимор", PalindromeSubstring.getLongestPalindrome(s4));
String s5 = "киикгорныйбаран";
assertEquals("киик", PalindromeSubstring.getLongestPalindrome(s5));
String s6 = "ихибогмузыкиуегиптян";
assertEquals("ихи", PalindromeSubstring.getLongestPalindrome(s6));
String s7 = "а";
assertEquals("а", PalindromeSubstring.getLongestPalindrome(s7));
String s8 = "";
assertEquals("", PalindromeSubstring.getLongestPalindrome(s8));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.