mirror of
https://github.com/revanced/revanced-patcher.git
synced 2025-05-04 22:44:24 +02:00
chore: Test default option value
This commit is contained in:
parent
64343e5a7c
commit
098c2c1efa
@ -8,6 +8,7 @@ import app.revanced.patcher.patch.options.PatchOption.PatchExtensions.stringPatc
|
|||||||
import org.junit.jupiter.api.assertDoesNotThrow
|
import org.junit.jupiter.api.assertDoesNotThrow
|
||||||
import org.junit.jupiter.api.assertThrows
|
import org.junit.jupiter.api.assertThrows
|
||||||
import kotlin.test.Test
|
import kotlin.test.Test
|
||||||
|
import kotlin.test.assertNull
|
||||||
import kotlin.test.assertTrue
|
import kotlin.test.assertTrue
|
||||||
|
|
||||||
internal class PatchOptionsTest {
|
internal class PatchOptionsTest {
|
||||||
@ -84,6 +85,10 @@ internal class PatchOptionsTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun `getting default value should work`() =
|
||||||
|
assertDoesNotThrow { assertNull(OptionsTestPatch.resettableOption.default) }
|
||||||
|
|
||||||
private object OptionsTestPatch : BytecodePatch() {
|
private object OptionsTestPatch : BytecodePatch() {
|
||||||
var booleanOption by booleanPatchOption("bool", true)
|
var booleanOption by booleanPatchOption("bool", true)
|
||||||
var requiredStringOption by stringPatchOption("required", "default", required = true)
|
var requiredStringOption by stringPatchOption("required", "default", required = true)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user