Skip to content

Commit

Permalink
chore: Test default option value
Browse files Browse the repository at this point in the history
  • Loading branch information
oSumAtrIX committed Oct 22, 2023
1 parent 64343e5 commit 098c2c1
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 098c2c1

Please sign in to comment.