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.dataMappings.*
|
||||||
import de.pheerai.rcdbquery.dsl.*
|
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 {
|
fun generateQueryUrl() = rcdbQuery {
|
||||||
searchFor(SearchType.COASTER)
|
searchFor(SearchType.COASTER)
|
||||||
searchTerm("Dragon")
|
searchTerm("Dragon")
|
||||||
|
|
|
@ -6,6 +6,6 @@ import kotlin.test.assertTrue
|
||||||
class SampleTests {
|
class SampleTests {
|
||||||
@Test
|
@Test
|
||||||
fun testMe() {
|
fun testMe() {
|
||||||
assertTrue(Sample().checkMe() > 0)
|
assertTrue(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1 @@
|
||||||
package de.pheerai.rcdbquery
|
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
|
package de.pheerai.rcdbquery
|
||||||
|
|
||||||
actual class Sample {
|
|
||||||
actual fun checkMe() = 42
|
|
||||||
}
|
|
||||||
|
|
||||||
actual object Platform {
|
|
||||||
actual val name: String = "JVM"
|
|
||||||
}
|
|
||||||
|
|
||||||
fun main() {
|
fun main() {
|
||||||
print(generateQueryUrl())
|
print(generateQueryUrl())
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,6 @@ import kotlin.test.assertTrue
|
||||||
class SampleTestsJVM {
|
class SampleTestsJVM {
|
||||||
@Test
|
@Test
|
||||||
fun testHello() {
|
fun testHello() {
|
||||||
assertTrue("JVM" in hello())
|
assertTrue(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,5 @@
|
||||||
package de.pheerai.rcdbquery
|
package de.pheerai.rcdbquery
|
||||||
|
|
||||||
actual class Sample {
|
|
||||||
actual fun checkMe() = 7
|
|
||||||
}
|
|
||||||
|
|
||||||
actual object Platform {
|
|
||||||
actual val name: String = "Native"
|
|
||||||
}
|
|
||||||
|
|
||||||
fun main() {
|
fun main() {
|
||||||
println(generateQueryUrl())
|
println(generateQueryUrl())
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,6 @@ import kotlin.test.assertTrue
|
||||||
class SampleTestsNative {
|
class SampleTestsNative {
|
||||||
@Test
|
@Test
|
||||||
fun testHello() {
|
fun testHello() {
|
||||||
assertTrue("Native" in hello())
|
assertTrue(true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue