Closed arkivanov closed 2 months ago
The recent changes to the InstanceKeeper
class and its associated tests involve altering the way instances are keyed and managed. Specifically, the key for storing instances has been updated from using T::class
to typeOf<T>()
. This impacts both the getOrCreate
and getOrCreateSimple
methods, ensuring more precise instance management. Corresponding test cases have been updated to validate the new keying mechanism, covering various scenarios of instance creation and retrieval.
Files | Change Summary |
---|---|
instance-keeper/src/commonMain/kotlin/com/arkivanov/essenty/instancekeeper/InstanceKeeperExt.kt |
Updated instance keying from T::class to typeOf<T>() in getOrCreate and getOrCreateSimple methods. |
instance-keeper/src/commonTest/kotlin/com/arkivanov/essenty/instancekeeper/InstanceKeeperExtTest.kt |
Added new test cases to cover scenarios with different keys and types, ensuring correct instance management. |
In code's vast realm, a change took flight,
FromT::class
totypeOf<T>()
, a shift so bright.
Instances kept with a keener eye,
Ensuring uniqueness as time goes by.
Tests evolved to match the pace,
In this keeper's tale, a smoother grace.
🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
Enhancements
Testing