fix: test compilation errors

This commit is contained in:
Akash Yadav
2024-07-20 20:43:19 +05:30
parent f837b9369e
commit fac8ac61e1
4 changed files with 7 additions and 8 deletions
-2
View File
@@ -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?
}
@@ -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"