Get rid of MultiPlatform Code, pt 1.
This commit is contained in:
parent
3913c4af76
commit
e74840fb6a
7 changed files with 3 additions and 37 deletions
|
@ -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")
|
||||
|
|
|
@ -6,6 +6,6 @@ import kotlin.test.assertTrue
|
|||
class SampleTests {
|
||||
@Test
|
||||
fun testMe() {
|
||||
assertTrue(Sample().checkMe() > 0)
|
||||
assertTrue(true)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1 @@
|
|||
package de.pheerai.rcdbquery
|
||||
|
||||
actual class Sample {
|
||||
actual fun checkMe() = 12
|
||||
}
|
||||
|
||||
actual object Platform {
|
||||
actual val name: String = "JS"
|
||||
}
|
||||
|
|
|
@ -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())
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@ import kotlin.test.assertTrue
|
|||
class SampleTestsJVM {
|
||||
@Test
|
||||
fun testHello() {
|
||||
assertTrue("JVM" in hello())
|
||||
assertTrue(true)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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())
|
||||
}
|
||||
|
|
|
@ -6,6 +6,6 @@ import kotlin.test.assertTrue
|
|||
class SampleTestsNative {
|
||||
@Test
|
||||
fun testHello() {
|
||||
assertTrue("Native" in hello())
|
||||
assertTrue(true)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue