change method

SuiteConfiguration change({
  1. bool? allowDuplicateTestNames,
  2. bool? allowTestRandomization,
  3. bool? jsTrace,
  4. bool? runSkipped,
  5. Iterable<String>? dart2jsArgs,
  6. String? precompiledPath,
  7. Iterable<CompilerSelection>? compilerSelections,
  8. Iterable<RuntimeSelection>? runtimes,
  9. Map<BooleanSelector, SuiteConfiguration>? tags,
  10. Map<PlatformSelector, SuiteConfiguration>? onPlatform,
  11. bool? ignoreTimeouts,
  12. Timeout? timeout,
  13. bool? verboseTrace,
  14. bool? chainStackTraces,
  15. bool? skip,
  16. int? retry,
  17. String? skipReason,
  18. PlatformSelector? testOn,
  19. Iterable<String>? addTags,
})

Returns a copy of this configuration with the given fields updated.

Note that unlike merge, this has no merging behavior—the old value is always replaced by the new one.

Implementation

SuiteConfiguration change(
    {bool? allowDuplicateTestNames,
    bool? allowTestRandomization,
    bool? jsTrace,
    bool? runSkipped,
    Iterable<String>? dart2jsArgs,
    String? precompiledPath,
    Iterable<CompilerSelection>? compilerSelections,
    Iterable<RuntimeSelection>? runtimes,
    Map<BooleanSelector, SuiteConfiguration>? tags,
    Map<PlatformSelector, SuiteConfiguration>? onPlatform,
    bool? ignoreTimeouts,

    // Test-level configuration
    Timeout? timeout,
    bool? verboseTrace,
    bool? chainStackTraces,
    bool? skip,
    int? retry,
    String? skipReason,
    PlatformSelector? testOn,
    Iterable<String>? addTags}) {
  var config = SuiteConfiguration._(
      allowDuplicateTestNames:
          allowDuplicateTestNames ?? _allowDuplicateTestNames,
      allowTestRandomization:
          allowTestRandomization ?? _allowTestRandomization,
      jsTrace: jsTrace ?? _jsTrace,
      runSkipped: runSkipped ?? _runSkipped,
      dart2jsArgs: dart2jsArgs?.toList() ?? this.dart2jsArgs,
      testSelections: testSelections,
      precompiledPath: precompiledPath ?? this.precompiledPath,
      compilerSelections: compilerSelections ?? this.compilerSelections,
      runtimes: runtimes ?? _runtimes,
      tags: tags ?? this.tags,
      onPlatform: onPlatform ?? this.onPlatform,
      ignoreTimeouts: ignoreTimeouts ?? _ignoreTimeouts,
      metadata: _metadata.change(
          timeout: timeout,
          verboseTrace: verboseTrace,
          chainStackTraces: chainStackTraces,
          skip: skip,
          retry: retry,
          skipReason: skipReason,
          testOn: testOn,
          tags: addTags?.toSet()));
  return config._resolveTags();
}