add basic Tests

main
ByrmGkcn 2023-12-06 14:45:03 +01:00
parent 5dcc6fade0
commit 29871a925e
2 changed files with 17 additions and 3 deletions

View File

@ -35,9 +35,8 @@ dependencies {
implementation("io.ktor:ktor-server-netty:1.6.3") implementation("io.ktor:ktor-server-netty:1.6.3")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2") implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.6.2")
implementation("io.ktor:ktor-html-builder:1.6.3") implementation("io.ktor:ktor-html-builder:1.6.3")
implementation("junit:junit:4.13.1")
testImplementation("junit:junit:4.13.1")
} }

View File

@ -0,0 +1,15 @@
package main
import junit.framework.TestCase.assertEquals
import org.junit.Test
class ParserTest {
@Test
fun testDelStrings() {
val input = "This is a \"sample\" string."
val output = delStrings(input)
assertEquals("This is a string.", output)
}
}