-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ecefc7e
commit 4e36287
Showing
5 changed files
with
78 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Enable auto-env through the sdkman_auto_env config | ||
# Add key=value pairs of SDKs to use below | ||
java=16.0.0-zulu | ||
java=23.0.1-zulu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
ktstrings/src/test/kotlin/com/kotlinground/strings/palindromes/IsPalindromeTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
package com.kotlinground.strings.palindromes | ||
|
||
import kotlin.test.Test | ||
import kotlin.test.assertFalse | ||
import kotlin.test.assertTrue | ||
|
||
class IsPalindromeTest { | ||
|
||
@Test | ||
fun `should return true for anna`() { | ||
val s = "anna" | ||
val actual = isPalindrome(s) | ||
assertTrue(actual) | ||
} | ||
|
||
@Test | ||
fun `should return false for walter`() { | ||
val s = "walter" | ||
val actual = isPalindrome(s) | ||
assertFalse(actual) | ||
} | ||
|
||
@Test | ||
fun `should return true for 12321`() { | ||
val s = "12321" | ||
val actual = isPalindrome(s) | ||
assertTrue(actual) | ||
} | ||
|
||
@Test | ||
fun `should return false for 123456`() { | ||
val s = "123456" | ||
val actual = isPalindrome(s) | ||
assertFalse(actual) | ||
} | ||
|
||
@Test | ||
fun `should return true for Was it a cat I saw`() { | ||
val s = "Was it a cat I saw?" | ||
val actual = isPalindrome(s) | ||
assertTrue(actual) | ||
} | ||
|
||
@Test | ||
fun `should return true for Never odd or even`() { | ||
val s = "Never odd or even" | ||
val actual = isPalindrome(s) | ||
assertTrue(actual) | ||
} | ||
|
||
@Test | ||
fun `should return true for radar`() { | ||
val s = "radar" | ||
val actual = isPalindrome(s) | ||
assertTrue(actual) | ||
} | ||
|
||
@Test | ||
fun `should return true for Live on time, emit no evil`() { | ||
val s = "Live on time, emit no evil" | ||
val actual = isPalindrome(s) | ||
assertTrue(actual) | ||
} | ||
|
||
} |