Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
fix: test compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
itsaky committed Jul 20, 2024
1 parent f837b93 commit fac8ac6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 0 additions & 2 deletions utilities/lookup/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ plugins {
id("kotlin-kapt")
}



dependencies {
kapt(libs.google.auto.service)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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?
}
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ class ResourceTableRegistryTest {
}

resourceTable!!.findResource(
com.android.aaptcompiler.ResourceName(
ResourceName(
pck = "android",
type = STRING,
entry = "ok"
Expand All @@ -169,15 +169,15 @@ 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")
}
}
}

resourceTable
.findResource(
com.android.aaptcompiler.ResourceName(
ResourceName(
pck = "android",
type = STRING,
entry = "cancel"
Expand All @@ -191,15 +191,15 @@ 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")
}
}
}

resourceTable
.findResource(
com.android.aaptcompiler.ResourceName(
ResourceName(
pck = "android",
type = COLOR,
entry = "holo_red_dark"
Expand Down

0 comments on commit fac8ac6

Please sign in to comment.