Browse Source

TODO asdf

shish/composable-test-cases-k2
Pavel Shishkin 4 days ago
parent
commit
be858c6332
  1. 2
      compose/integrations/composable-test-cases/build.gradle.kts
  2. 2
      compose/integrations/composable-test-cases/gradle/libs.versions.toml
  3. 10
      compose/integrations/composable-test-cases/settings.gradle.kts
  4. 2
      compose/integrations/composable-test-cases/testcases/valueClass/lib/src/commonMain/kotlin/Dependencies.kt
  5. 7
      compose/integrations/composable-test-cases/testcases/valueClass/main/src/commonTest/kotlin/Tests.kt

2
compose/integrations/composable-test-cases/build.gradle.kts

@ -120,3 +120,5 @@ fun KotlinSourceSet.libDependencyForMain1() {
// if (project.name.endsWith("-main")) error("Unexpected main module name: ${project.name}")
// return project(":" + project.name.replace("-main", "-lib"))
//}
println("kotlin version: ${libs.versions.kotlin.get()}")

2
compose/integrations/composable-test-cases/gradle/libs.versions.toml

@ -1,5 +1,5 @@
[versions]
kotlin="2.1.0-RC"
kotlin="2.1.0-RC2-375"
kotlinx-coroutines = "1.8.0"
compose = "1.7.0"

10
compose/integrations/composable-test-cases/settings.gradle.kts

@ -17,6 +17,16 @@ dependencyResolutionManagement {
maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/dev")
mavenLocal()
}
versionCatalogs {
register("libs").configure {
val kotlinVersion = providers.gradleProperty("kotlin_version").orNull
if (kotlinVersion != null) {
version("kotlin", kotlinVersion)
// println("kotlin version applied: $kotlinVersion")
}
}
}
}
fun module(name: String, path: String) {

2
compose/integrations/composable-test-cases/testcases/valueClass/lib/src/commonMain/kotlin/Dependencies.kt

@ -62,3 +62,5 @@ value class VCPrivateAllNonPrimitive private constructor(private val value: Stri
val V2 = VCPrivateAllNonPrimitive("V2")
}
}
data class DCCopyAvailable(val value: Int)

7
compose/integrations/composable-test-cases/testcases/valueClass/main/src/commonTest/kotlin/Tests.kt

@ -1,13 +1,10 @@
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import com.example.common.TextContainerNode
import com.example.common.TextLeafNode
import com.example.common.composeText
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.Job
import kotlinx.coroutines.test.runTest
import kotlin.test.Ignore
import kotlin.test.Test
import kotlin.test.assertEquals
@ -190,4 +187,8 @@ class Tests {
job.cancel()
}
@Test
fun testDataClassCopyAvailable() = runTest {
val a = DCCopyAvailable(10).copy()
}
}

Loading…
Cancel
Save