LeakTrackingTestConfig class

Configuration for leak tracking to pass to an individual unit test.

Customized configuration is needed only for test debugging, not for regular test runs.

Constructors

LeakTrackingTestConfig.new({LeakDiagnosticConfig leakDiagnosticConfig = const LeakDiagnosticConfig(), Map<String, int?> notGCedAllowList = const <String, int>{}, Map<String, int?> notDisposedAllowList = const <String, int>{}, bool allowAllNotDisposed = false, bool allowAllNotGCed = false, MemoryBaselining? baselining, bool isLeakTrackingPaused = false})
Creates a new instance of LeakTrackingTestConfig.
const
LeakTrackingTestConfig.debug({LeakDiagnosticConfig leakDiagnosticConfig = const LeakDiagnosticConfig(collectStackTraceOnStart: true, collectStackTraceOnDisposal: true, collectRetainingPathForNotGCed: true), Map<String, int?> notGCedAllowList = const <String, int>{}, Map<String, int?> notDisposedAllowList = const <String, int>{}, bool allowAllNotDisposed = false, bool allowAllNotGCed = false, MemoryBaselining? baselining, bool isLeakTrackingPaused = false})
Creates a new instance for debugging leaks.
LeakTrackingTestConfig.debugNotDisposed({LeakDiagnosticConfig leakDiagnosticConfig = const LeakDiagnosticConfig(collectStackTraceOnStart: true), Map<String, int?> notGCedAllowList = const <String, int>{}, Map<String, int?> notDisposedAllowList = const <String, int>{}, bool allowAllNotDisposed = false, bool allowAllNotGCed = false, MemoryBaselining? baselining, bool isLeakTrackingPaused = false})
Creates a new instance for debugging notDisposed leaks.
LeakTrackingTestConfig.debugNotGCed({LeakDiagnosticConfig leakDiagnosticConfig = const LeakDiagnosticConfig(collectStackTraceOnDisposal: true, collectRetainingPathForNotGCed: true), Map<String, int?> notGCedAllowList = const <String, int>{}, Map<String, int?> notDisposedAllowList = const <String, int>{}, bool allowAllNotDisposed = false, bool allowAllNotGCed = false, MemoryBaselining? baselining, bool isLeakTrackingPaused = false})
Creates a new instance for debugging notGCed leaks.
LeakTrackingTestConfig.retainingPath({LeakDiagnosticConfig leakDiagnosticConfig = const LeakDiagnosticConfig(collectRetainingPathForNotGCed: true), Map<String, int?> notGCedAllowList = const <String, int>{}, Map<String, int?> notDisposedAllowList = const <String, int>{}, bool allowAllNotDisposed = false, bool allowAllNotGCed = false, MemoryBaselining? baselining, bool isLeakTrackingPaused = false})
Creates a new instance to collect retaining path.
const

Properties

allowAllNotDisposed → bool
If true, all notDisposed leaks will be allowed.
final
allowAllNotGCed → bool
If true, all notGCed leaks will be allowed.
final
baselining → MemoryBaselining?
Configuration for memory baselining.
final
hashCode → int
The hash code for this object.
no setterinherited
isLeakTrackingPaused → bool
If true, leak tracking will not happen.
final
leakDiagnosticConfig → LeakDiagnosticConfig
When to collect stack trace information.
final
notDisposedAllowList → Map<String, int?>
Classes that are allowed to be garbage collected without being disposed.
final
notGCedAllowList → Map<String, int?>
Classes that are allowed to be not garbage collected after disposal.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited