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

Side by Side Diff: test/runner/configuration/configuration_test.dart

Issue 1730173004: Add on_os and on_platform fields. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 4 years, 9 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 | « lib/src/utils.dart ('k') | test/runner/configuration/platform_test.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 @TestOn("vm") 5 @TestOn("vm")
6 6
7 import 'package:boolean_selector/boolean_selector.dart'; 7 import 'package:boolean_selector/boolean_selector.dart';
8 import 'package:path/path.dart' as p; 8 import 'package:path/path.dart' as p;
9 import 'package:test/test.dart'; 9 import 'package:test/test.dart';
10 10
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 256
257 test("if the merge conflicts, prefers the new value", () { 257 test("if the merge conflicts, prefers the new value", () {
258 var older = new Configuration( 258 var older = new Configuration(
259 timeout: new Timeout(new Duration(seconds: 1))); 259 timeout: new Timeout(new Duration(seconds: 1)));
260 var newer = new Configuration( 260 var newer = new Configuration(
261 timeout: new Timeout(new Duration(seconds: 2))); 261 timeout: new Timeout(new Duration(seconds: 2)));
262 var merged = older.merge(newer); 262 var merged = older.merge(newer);
263 expect(merged.timeout, equals(new Timeout(new Duration(seconds: 2)))); 263 expect(merged.timeout, equals(new Timeout(new Duration(seconds: 2))));
264 }); 264 });
265 }); 265 });
266
267 group("for onPlatform", () {
268 test("merges each nested configuration", () {
269 var merged = new Configuration(
270 onPlatform: {
271 new PlatformSelector.parse("vm"): new Configuration(verboseTrace: tr ue),
272 new PlatformSelector.parse("chrome"): new Configuration(jsTrace: tru e)
273 }
274 ).merge(new Configuration(
275 onPlatform: {
276 new PlatformSelector.parse("chrome"): new Configuration(jsTrace: fal se),
277 new PlatformSelector.parse("firefox"): new Configuration(skip: true)
278 }
279 ));
280
281 expect(merged.onPlatform[new PlatformSelector.parse("vm")].verboseTrace,
282 isTrue);
283 expect(merged.onPlatform[new PlatformSelector.parse("chrome")].jsTrace,
284 isFalse);
285 expect(merged.onPlatform[new PlatformSelector.parse("firefox")].skip,
286 isTrue);
287 });
288 });
266 }); 289 });
267 } 290 }
OLDNEW
« no previous file with comments | « lib/src/utils.dart ('k') | test/runner/configuration/platform_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698