PluginHarness class final
What a plugin's conformance run is given besides the plugin: the world it acts on, the registries it asks for, and the application around it.
The world is the loop's. What the plugin acts on is captured,
restored and digested through the loop's own snapshots
(EngineLoop.snapshots), the one path a rollback and a replay take: so
setUp puts the application's state in loop.world, or adds a
SnapshotPart for state it keeps elsewhere (loop.snapshots.add), and
a plugin that keeps state of its own adds its part when it is installed.
A check never takes a second pair of functions that could disagree with
what a rollback restores.
Everything optional, and what is left out is said rather than
assumed. A plugin whose loop holds nothing — no entity, no resource, no
part — passes with nothing here, but determinism is then compared on its
events alone, the outcome says the world was not compared, and the badge
waits for a world (earnsBadge).
Constructors
-
PluginHarness({List<
PluginRegistry> registries(String? backend)?, void setUp(EngineLoop loop)?, List<Flutter3dPlugin> dependencies()?, int steps = 600, SimulationProfile profile = SimulationProfile.deterministic, String? package}) -
A harness running
stepssteps a run, 600 by default, underprofile;stepsmust be above nought.const
Properties
-
dependencies
→ List<
Flutter3dPlugin> Function()? -
The plugins the one under test depends on, made fresh for each loop.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- package → String?
-
The package that ships the plugin under test, by its pubspec name, or
null to leave the question unasked.
final
- profile → SimulationProfile
-
The profile every loop of the suite runs under: the default
simulation unless the plugin brings a solver a profile switches on,
which is held to the checks under the profile that runs it.
final
-
registries
→ List<
PluginRegistry> Function(String? backend)? -
The registries the plugin asks its host for —
EntityKinds,RendererSteps,WorldFields— made fresh for each loop, forbackend(null for none).final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- setUp → void Function(EngineLoop loop)?
-
The application's own part of the loop: the phases and systems that
step the world the plugin acts on, and that world — in
loop.world, or aSnapshotPartadded toloop.snapshotsfor state kept elsewhere. Called once on every loop the suite builds, after the plugins are installed and before a step runs; every loop after the first is then put back to the state the first began from, through its snapshots.final - steps → int
-
How many steps the determinism, switching and budget runs take.
final
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