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