1 package leakcanary
2 
3 object LeakAssertions {
4 
5   /**
6    * Asserts that there are no leak in the heap at this point in time.
7    *
8    * This method should be called on the instrumentation thread.
9    *
10    * This method is may block the current thread for a significant amount of time,
11    * as it might need to dump the heap and analyze it.
12    *
13    * If leaks are found, this method is expected to throw an exception, which will fail the test.
14    *
15    * The specific details depend on what you configured in [DetectLeaksAssert.update].
16    *
17    * [tag] identifies the calling code, which can then be used for reporting purposes or to skip
18    * leak detection for specific tags in a subset of tests (see [SkipLeakDetection]).
19    */
assertNoLeaksnull20   fun assertNoLeaks(tag: String = NO_TAG) {
21     DetectLeaksAssert.delegate.assertNoLeaks(tag)
22   }
23 
24   const val NO_TAG = ""
25 }
26 
27 
28 
29 
30 
31