Metadata class final
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(Map 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, Object? 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.
no setter
-
forTag
→ Map<
BooleanSelector, Metadata> -
Metadata that applies only when specific tags are applied.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- skip → bool
-
Whether the test or suite should be skipped.
no setter
- 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.
no setter
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
withother
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent 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