Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Side by Side Diff: lib/src/backend/metadata.dart

Issue 1717483002: Make PlatformSelector use boolean_selector. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « README.md ('k') | lib/src/backend/platform_selector.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:collection'; 5 import 'dart:collection';
6 6
7 import 'package:collection/collection.dart'; 7 import 'package:collection/collection.dart';
8 8
9 import '../frontend/skip.dart'; 9 import '../frontend/skip.dart';
10 import '../frontend/timeout.dart'; 10 import '../frontend/timeout.dart';
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 "Dart identifiers."); 245 "Dart identifiers.");
246 } 246 }
247 247
248 /// Return a new [Metadata] that merges [this] with [other]. 248 /// Return a new [Metadata] that merges [this] with [other].
249 /// 249 ///
250 /// If the two [Metadata]s have conflicting properties, [other] wins. If 250 /// If the two [Metadata]s have conflicting properties, [other] wins. If
251 /// either has a [forTag] metadata for one of the other's tags, that metadata 251 /// either has a [forTag] metadata for one of the other's tags, that metadata
252 /// is merged as well. 252 /// is merged as well.
253 Metadata merge(Metadata other) => 253 Metadata merge(Metadata other) =>
254 new Metadata( 254 new Metadata(
255 testOn: testOn.intersect(other.testOn), 255 testOn: testOn.intersection(other.testOn),
256 timeout: timeout.merge(other.timeout), 256 timeout: timeout.merge(other.timeout),
257 skip: skip || other.skip, 257 skip: skip || other.skip,
258 skipReason: other.skipReason == null ? skipReason : other.skipReason, 258 skipReason: other.skipReason == null ? skipReason : other.skipReason,
259 verboseTrace: verboseTrace || other.verboseTrace, 259 verboseTrace: verboseTrace || other.verboseTrace,
260 tags: tags.union(other.tags), 260 tags: tags.union(other.tags),
261 onPlatform: mergeMaps(onPlatform, other.onPlatform, 261 onPlatform: mergeMaps(onPlatform, other.onPlatform,
262 value: (metadata1, metadata2) => metadata1.merge(metadata2)), 262 value: (metadata1, metadata2) => metadata1.merge(metadata2)),
263 forTag: mergeMaps(forTag, other.forTag, 263 forTag: mergeMaps(forTag, other.forTag,
264 value: (metadata1, metadata2) => metadata1.merge(metadata2))); 264 value: (metadata1, metadata2) => metadata1.merge(metadata2)));
265 265
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 _serializeTimeout(Timeout timeout) { 316 _serializeTimeout(Timeout timeout) {
317 if (timeout == Timeout.none) return 'none'; 317 if (timeout == Timeout.none) return 'none';
318 return { 318 return {
319 'duration': timeout.duration == null 319 'duration': timeout.duration == null
320 ? null 320 ? null
321 : timeout.duration.inMicroseconds, 321 : timeout.duration.inMicroseconds,
322 'scaleFactor': timeout.scaleFactor 322 'scaleFactor': timeout.scaleFactor
323 }; 323 };
324 } 324 }
325 } 325 }
OLDNEW
« no previous file with comments | « README.md ('k') | lib/src/backend/platform_selector.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698