Lazy: Rename valueCreated property to isInitialized() function.

Notes about behavior of Lazy when initializer throws an exception.
This commit is contained in:
Ilya Gorbunov
2015-06-17 22:44:08 +03:00
parent ecd131a7a1
commit b71fe4cd25
4 changed files with 17 additions and 11 deletions
+2 -2
View File
@@ -22,12 +22,12 @@ class LazyTest {
var callCount = 0
val lazyInt = lazy { ++callCount }
assertFalse(lazyInt.valueCreated)
assertFalse(lazyInt.isInitialized())
assertEquals(0, callCount)
lazyInt.value
assertTrue(lazyInt.valueCreated)
assertTrue(lazyInt.isInitialized())
}