change method
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,
- Timeout? timeout,
- bool? verboseTrace,
- bool? chainStackTraces,
- bool? skip,
- int? retry,
- String? skipReason,
- PlatformSelector? testOn,
- 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();
}