forked from igorwojda/kotlin-coding-challenges
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathchallenge.kt
46 lines (36 loc) · 1005 Bytes
/
challenge.kt
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
package com.igorwojda.string.ispalindrome.basic
import org.amshove.kluent.shouldBeEqualTo
import org.junit.jupiter.api.Test
private fun isPalindrome(str: String): Boolean {
TODO("not implemented")
}
private class Test {
@Test
fun `"aba" is a palindrome`() {
isPalindrome("aba") shouldBeEqualTo true
}
@Test
fun `" aba" is not a palindrome`() {
isPalindrome(" aba") shouldBeEqualTo false
}
@Test
fun `"aba " is not a palindrome`() {
isPalindrome("aba ") shouldBeEqualTo false
}
@Test
fun `"greetings" is not a palindrome`() {
isPalindrome("greetings") shouldBeEqualTo false
}
@Test
fun `"1000000001" a palindrome`() {
isPalindrome("1000000001") shouldBeEqualTo true
}
@Test
fun `"Fish hsif" is not a palindrome`() {
isPalindrome("Fish hsif") shouldBeEqualTo false
}
@Test
fun `"pennep" a palindrome`() {
isPalindrome("pennep") shouldBeEqualTo true
}
}