Skip to content

Commit

Permalink
Add test to verify default delegate key is as expected.
Browse files Browse the repository at this point in the history
  • Loading branch information
russhwolf committed Apr 21, 2019
1 parent e9339da commit adc2d91
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,14 @@ class SettingsTest {
assertEquals(null, a)
}

@Test
@Suppress("UNUSED_VALUE", "ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
fun defaultKey() {
var a by settings.string()
a = "value"
assertEquals("value", settings.getString("a"))
}

@Test
fun delegateReuseTest() {
// Is this a reasonable use-case? Might as well protect it for now. That way if we break it later it'll be on
Expand Down

0 comments on commit adc2d91

Please sign in to comment.