mirror of
https://github.com/ReVanced/revanced-library.git
synced 2026-01-11 13:56:17 +00:00
chore: Fix builds
This commit is contained in:
@@ -61,12 +61,12 @@ internal object PatchUtilsTest {
|
|||||||
fun assertEqualsExpected(compatiblePackageNames: Set<String>?) =
|
fun assertEqualsExpected(compatiblePackageNames: Set<String>?) =
|
||||||
assertEqualsVersions(
|
assertEqualsVersions(
|
||||||
expected =
|
expected =
|
||||||
mapOf(
|
mapOf(
|
||||||
"some.package" to linkedMapOf("a" to 3, "b" to 2, "c" to 1),
|
"some.package" to linkedMapOf("a" to 3, "b" to 2, "c" to 1),
|
||||||
"some.other.package" to linkedMapOf("b" to 3, "c" to 2, "d" to 1),
|
"some.other.package" to linkedMapOf("b" to 3, "c" to 2, "d" to 1),
|
||||||
"some.other.other.package" to linkedMapOf("a" to 1, "b" to 1),
|
"some.other.other.package" to linkedMapOf("a" to 1, "b" to 1),
|
||||||
"some.other.other.other.package" to linkedMapOf(),
|
"some.other.other.other.package" to linkedMapOf(),
|
||||||
),
|
),
|
||||||
patches,
|
patches,
|
||||||
compatiblePackageNames,
|
compatiblePackageNames,
|
||||||
countUnusedPatches = true,
|
countUnusedPatches = true,
|
||||||
@@ -74,12 +74,12 @@ internal object PatchUtilsTest {
|
|||||||
|
|
||||||
assertEqualsExpected(
|
assertEqualsExpected(
|
||||||
compatiblePackageNames =
|
compatiblePackageNames =
|
||||||
setOf(
|
setOf(
|
||||||
"some.package",
|
"some.package",
|
||||||
"some.other.package",
|
"some.other.package",
|
||||||
"some.other.other.package",
|
"some.other.other.package",
|
||||||
"some.other.other.other.package",
|
"some.other.other.other.package",
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
assertEqualsExpected(
|
assertEqualsExpected(
|
||||||
@@ -91,19 +91,19 @@ internal object PatchUtilsTest {
|
|||||||
fun `common versions correctly ordered for each package without counting unused patches`() {
|
fun `common versions correctly ordered for each package without counting unused patches`() {
|
||||||
assertEqualsVersions(
|
assertEqualsVersions(
|
||||||
expected =
|
expected =
|
||||||
mapOf(
|
mapOf(
|
||||||
"some.package" to linkedMapOf("a" to 1),
|
"some.package" to linkedMapOf("a" to 1),
|
||||||
"some.other.package" to linkedMapOf("b" to 2, "c" to 2, "d" to 1),
|
"some.other.package" to linkedMapOf("b" to 2, "c" to 2, "d" to 1),
|
||||||
"some.other.other.package" to linkedMapOf("a" to 1, "b" to 1),
|
"some.other.other.package" to linkedMapOf("a" to 1, "b" to 1),
|
||||||
),
|
),
|
||||||
patches,
|
patches,
|
||||||
compatiblePackageNames =
|
compatiblePackageNames =
|
||||||
setOf(
|
setOf(
|
||||||
"some.package",
|
"some.package",
|
||||||
"some.other.package",
|
"some.other.package",
|
||||||
"some.other.other.package",
|
"some.other.other.package",
|
||||||
"some.other.other.other.package",
|
"some.other.other.other.package",
|
||||||
),
|
),
|
||||||
countUnusedPatches = false,
|
countUnusedPatches = false,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@@ -170,14 +170,6 @@ internal object PatchUtilsTest {
|
|||||||
patches: PatchSet,
|
patches: PatchSet,
|
||||||
compatiblePackageName: String,
|
compatiblePackageName: String,
|
||||||
) {
|
) {
|
||||||
// Test both the deprecated and the new method.
|
|
||||||
|
|
||||||
@Suppress("DEPRECATION")
|
|
||||||
assertEquals(
|
|
||||||
expected,
|
|
||||||
PatchUtils.getMostCommonCompatibleVersion(patches, compatiblePackageName),
|
|
||||||
)
|
|
||||||
|
|
||||||
assertEquals(
|
assertEquals(
|
||||||
expected,
|
expected,
|
||||||
PatchUtils.getMostCommonCompatibleVersions(patches, setOf(compatiblePackageName))
|
PatchUtils.getMostCommonCompatibleVersions(patches, setOf(compatiblePackageName))
|
||||||
|
|||||||
Reference in New Issue
Block a user