mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2026-01-23 11:11:04 +00:00
fix: check if patch option requirement is met
This commit is contained in:
@@ -39,10 +39,10 @@ internal class PatchOptionsTest {
|
||||
@Test
|
||||
fun `should be able to set value to null`() {
|
||||
// Sadly, doing:
|
||||
// > options["key1"] = null
|
||||
// > options["key2"] = null
|
||||
// is not possible because Kotlin
|
||||
// cannot reify the type "Nothing?".
|
||||
options.nullify("key1")
|
||||
options.nullify("key2")
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -65,4 +65,11 @@ internal class PatchOptionsTest {
|
||||
options["key3"] = "this value is not an allowed option"
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
fun `should fail because of the requirement is not met`() {
|
||||
assertThrows<RequirementNotMetException> {
|
||||
options.nullify("key1")
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user