Add test for Palindrome (#2993)
This commit is contained in:
parent
77bcd4daa3
commit
1b02b41fcc
18
src/test/java/com/thealgorithms/strings/PalindromeTest.java
Normal file
18
src/test/java/com/thealgorithms/strings/PalindromeTest.java
Normal file
@ -0,0 +1,18 @@
|
||||
package com.thealgorithms.strings;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class PalindromeTest {
|
||||
@Test
|
||||
public void palindrome() {
|
||||
String input1 = "kayak";
|
||||
String input2 = "kayaks";
|
||||
Assertions.assertTrue(Palindrome.isPalindrome(input1));
|
||||
Assertions.assertFalse(Palindrome.isPalindrome(input2));
|
||||
Assertions.assertTrue(Palindrome.isPalindromeRecursion(input1));
|
||||
Assertions.assertFalse(Palindrome.isPalindromeRecursion(input2));
|
||||
Assertions.assertTrue(Palindrome.isPalindrome1(input1));
|
||||
Assertions.assertFalse(Palindrome.isPalindrome1(input2));
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user