Metadata class Null safety
Metadata for a test or test suite.
This metadata comes from declarations on the test itself; it doesn't include configuration from the user.
Constructors
-
Metadata({PlatformSelector? testOn, Timeout? timeout, bool? skip, bool? verboseTrace, bool? chainStackTraces, int? retry, String? skipReason, Iterable<
String> ? tags, Map<PlatformSelector, Metadata> ? onPlatform, Map<BooleanSelector, Metadata> ? forTag, String? languageVersionComment}) -
Creates new Metadata.
factory
- Metadata.deserialize(dynamic serialized)
- Deserializes the result of Metadata.serialize into a new Metadata.
-
Metadata.parse({String? testOn, Timeout? timeout, dynamic skip, bool? verboseTrace, bool? chainStackTraces, int? retry, Map<
String, dynamic> ? onPlatform, dynamic tags, String? languageVersionComment}) - Creates a new Metadata, but with fields parsed from caller-friendly values where applicable.
Properties
- chainStackTraces → bool
-
Whether to chain stack traces.
read-only
-
forTag
→ Map<
BooleanSelector, Metadata> -
Metadata that applies only when specific tags are applied.
final
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- languageVersionComment → String?
-
The language version comment, if one is present.
final
-
onPlatform
→ Map<
PlatformSelector, Metadata> -
Platform-specific metadata.
final
- retry → int
-
The number of times to re-run a test before being marked as a failure.
read-only
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- skip → bool
-
Whether the test or suite should be skipped.
read-only
- skipReason → String?
-
The reason the test or suite should be skipped, if given.
final
-
The user-defined tags attached to the test or suite.
final
- testOn → PlatformSelector
-
The selector indicating which platforms the suite supports.
final
- timeout → Timeout
-
The modification to the timeout for the test or suite.
final
- verboseTrace → bool
-
Whether to use verbose stack traces.
read-only
Methods
-
change(
{PlatformSelector? testOn, Timeout? timeout, bool? skip, bool? verboseTrace, bool? chainStackTraces, int? retry, String? skipReason, Map< PlatformSelector, Metadata> ? onPlatform, Set<String> ? tags, Map<BooleanSelector, Metadata> ? forTag, String? languageVersionComment}) → Metadata - Returns a copy of this with the given fields changed.
-
forPlatform(
SuitePlatform platform) → Metadata - Returns a copy of this with all platform-specific metadata from onPlatform resolved.
-
merge(
Metadata other) → Metadata -
Return a new Metadata that merges this with
other
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
serialize(
) → Map< String, dynamic> - Serializes this into a JSON-safe object that can be deserialized using Metadata.deserialize.
-
toString(
) → String -
A string representation of this object.
inherited
-
validatePlatformSelectors(
Set< String> validVariables) → void -
Throws a FormatException if any PlatformSelectors use any variables
that don't appear either in
validVariables
or in the set of variables that are known to be valid for all selectors.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited