Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pyricau committed May 1, 2024
1 parent d493e63 commit 0e20a37
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Expand Up @@ -25,7 +25,7 @@ class AndroidDetectLeaksAssertTest {
@Test fun detectsLeak() {
leaking = Date()
val objectWatcher = AppWatcher.objectWatcher
objectWatcher.expectDeletionFor(leaking, "This date should not live beyond the test")
objectWatcher.expectWeaklyReachable(leaking, "This date should not live beyond the test")
assertLeak(Date::class.java)
}

Expand Down
Expand Up @@ -29,7 +29,7 @@ class ObjectInspectorTest : HasActivityTestRule<TestActivity> {
runOnMainSync {
val observer = object : LifecycleObserver {}
activity.lifecycle.addObserver(observer)
AppWatcher.objectWatcher.expectDeletionFor(observer, "observer")
AppWatcher.objectWatcher.expectWeaklyReachable(observer, "observer")
}
triggersOnActivityDestroyed {
activityRule.finishActivity()
Expand Down
Expand Up @@ -8,7 +8,7 @@ import leakcanary.TriggeredDeletableObjectReporter.RetainTrigger
import shark.SharkLog

/**
* [ReferenceQueueRetainedObjectTracker] can be passed objects to [expectDeletionFor].
* [ReferenceQueueRetainedObjectTracker] can be passed objects to [expectDeletionOnTriggerFor].
* It will create [KeyedWeakReference] instances that reference tracked objects, and check if those
* references have been cleared as expected. If not, these
* objects are considered retained and [ReferenceQueueRetainedObjectTracker] will then notify
Expand Down

0 comments on commit 0e20a37

Please sign in to comment.