mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-15 23:44:48 +08:00
fix: test compilation errors
This commit is contained in:
@@ -23,8 +23,6 @@ plugins {
|
||||
id("kotlin-kapt")
|
||||
}
|
||||
|
||||
|
||||
|
||||
dependencies {
|
||||
kapt(libs.google.auto.service)
|
||||
|
||||
|
||||
@@ -775,7 +775,7 @@ class ResourceEntry(override val name: String) : IResourceEntry {
|
||||
var allowNew: AllowNew? = null
|
||||
var overlayable: OverlayableItem? = null
|
||||
|
||||
val values = mutableListOf<ResourceConfigValue>()
|
||||
override val values = mutableListOf<ResourceConfigValue>()
|
||||
|
||||
override fun findValue(config: ConfigDescription, product: String): ResourceConfigValue? {
|
||||
return values.find { it.config == config && it.product == product }
|
||||
|
||||
@@ -25,5 +25,6 @@ import com.android.aaptcompiler.ResourceConfigValue
|
||||
*/
|
||||
interface IResourceEntry {
|
||||
val name: String
|
||||
val values: Collection<ResourceConfigValue>
|
||||
fun findValue(config: ConfigDescription, product: String = ""): ResourceConfigValue?
|
||||
}
|
||||
+5
-5
@@ -156,7 +156,7 @@ class ResourceTableRegistryTest {
|
||||
}
|
||||
|
||||
resourceTable!!.findResource(
|
||||
com.android.aaptcompiler.ResourceName(
|
||||
ResourceName(
|
||||
pck = "android",
|
||||
type = STRING,
|
||||
entry = "ok"
|
||||
@@ -169,7 +169,7 @@ class ResourceTableRegistryTest {
|
||||
assertThat(this).isNotNull()
|
||||
assertThat(this!!.value).isNotNull()
|
||||
this.value.apply {
|
||||
assertThat(this).isInstanceOf(com.android.aaptcompiler.BasicString::class.java)
|
||||
assertThat(this).isInstanceOf(BasicString::class.java)
|
||||
assertThat(this.toString()).isEqualTo("OK")
|
||||
}
|
||||
}
|
||||
@@ -177,7 +177,7 @@ class ResourceTableRegistryTest {
|
||||
|
||||
resourceTable
|
||||
.findResource(
|
||||
com.android.aaptcompiler.ResourceName(
|
||||
ResourceName(
|
||||
pck = "android",
|
||||
type = STRING,
|
||||
entry = "cancel"
|
||||
@@ -191,7 +191,7 @@ class ResourceTableRegistryTest {
|
||||
assertThat(this).isNotNull()
|
||||
assertThat(this!!.value).isNotNull()
|
||||
this.value.apply {
|
||||
assertThat(this).isInstanceOf(com.android.aaptcompiler.BasicString::class.java)
|
||||
assertThat(this).isInstanceOf(BasicString::class.java)
|
||||
assertThat(this.toString()).isEqualTo("Cancel")
|
||||
}
|
||||
}
|
||||
@@ -199,7 +199,7 @@ class ResourceTableRegistryTest {
|
||||
|
||||
resourceTable
|
||||
.findResource(
|
||||
com.android.aaptcompiler.ResourceName(
|
||||
ResourceName(
|
||||
pck = "android",
|
||||
type = COLOR,
|
||||
entry = "holo_red_dark"
|
||||
|
||||
Reference in New Issue
Block a user