forPlatform method

  1. @override
Test? forPlatform(
  1. SuitePlatform platform
)
override

Returns a copy of this with all platform-specific metadata resolved.

Removes any tests and groups with Metadata.testOn selectors that don't match platform. Returns null if this entry's selector doesn't match.

Implementation

@override
Test? forPlatform(SuitePlatform platform) {
  if (!metadata.testOn.evaluate(platform)) return null;
  return LocalTest._(
    name,
    metadata.forPlatform(platform),
    _body,
    trace,
    location,
    _guarded,
    isScaffoldAll,
  );
}