Get rid of MultiPlatform Code, pt 1.

This commit is contained in:
Oliver Rümpelein 2020-04-19 12:09:50 +02:00
parent 3913c4af76
commit e74840fb6a
7 changed files with 3 additions and 37 deletions

View file

@ -3,16 +3,6 @@ package de.pheerai.rcdbquery
import de.pheerai.rcdbquery.dataMappings.*
import de.pheerai.rcdbquery.dsl.*
expect class Sample() {
fun checkMe(): Int
}
expect object Platform {
val name: String
}
fun hello(): String = "Hello from ${Platform.name}"
fun generateQueryUrl() = rcdbQuery {
searchFor(SearchType.COASTER)
searchTerm("Dragon")

View file

@ -6,6 +6,6 @@ import kotlin.test.assertTrue
class SampleTests {
@Test
fun testMe() {
assertTrue(Sample().checkMe() > 0)
assertTrue(true)
}
}

View file

@ -1,9 +1 @@
package de.pheerai.rcdbquery
actual class Sample {
actual fun checkMe() = 12
}
actual object Platform {
actual val name: String = "JS"
}

View file

@ -1,13 +1,5 @@
package de.pheerai.rcdbquery
actual class Sample {
actual fun checkMe() = 42
}
actual object Platform {
actual val name: String = "JVM"
}
fun main() {
print(generateQueryUrl())
}

View file

@ -6,6 +6,6 @@ import kotlin.test.assertTrue
class SampleTestsJVM {
@Test
fun testHello() {
assertTrue("JVM" in hello())
assertTrue(true)
}
}

View file

@ -1,13 +1,5 @@
package de.pheerai.rcdbquery
actual class Sample {
actual fun checkMe() = 7
}
actual object Platform {
actual val name: String = "Native"
}
fun main() {
println(generateQueryUrl())
}

View file

@ -6,6 +6,6 @@ import kotlin.test.assertTrue
class SampleTestsNative {
@Test
fun testHello() {
assertTrue("Native" in hello())
assertTrue(true)
}
}