From 098c2c1efafba116cd4601c4fd3954488b7c78b9 Mon Sep 17 00:00:00 2001 From: oSumAtrIX Date: Sun, 22 Oct 2023 02:50:26 +0200 Subject: [PATCH] chore: Test default option value --- .../app/revanced/patcher/patch/options/PatchOptionsTest.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/test/kotlin/app/revanced/patcher/patch/options/PatchOptionsTest.kt b/src/test/kotlin/app/revanced/patcher/patch/options/PatchOptionsTest.kt index 1340eff2..b008bcb5 100644 --- a/src/test/kotlin/app/revanced/patcher/patch/options/PatchOptionsTest.kt +++ b/src/test/kotlin/app/revanced/patcher/patch/options/PatchOptionsTest.kt @@ -8,6 +8,7 @@ import app.revanced.patcher.patch.options.PatchOption.PatchExtensions.stringPatc import org.junit.jupiter.api.assertDoesNotThrow import org.junit.jupiter.api.assertThrows import kotlin.test.Test +import kotlin.test.assertNull import kotlin.test.assertTrue 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() { var booleanOption by booleanPatchOption("bool", true) var requiredStringOption by stringPatchOption("required", "default", required = true)