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

Side by Side Diff: pkg/code_transformers/test/assets_test.dart

Issue 216233002: pkg/code_transformers: removed unused imports, require latest unittest (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 library code_transformers.test.assets_test; 5 library code_transformers.test.assets_test;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io' show File, Platform;
9 8
10 import 'package:barback/barback.dart'; 9 import 'package:barback/barback.dart';
11 import 'package:code_transformers/assets.dart'; 10 import 'package:code_transformers/assets.dart';
12 import 'package:code_transformers/resolver.dart';
13 import 'package:code_transformers/tests.dart'; 11 import 'package:code_transformers/tests.dart';
14 import 'package:path/path.dart' as path;
15 import 'package:unittest/compact_vm_config.dart'; 12 import 'package:unittest/compact_vm_config.dart';
16 import 'package:unittest/unittest.dart'; 13 import 'package:unittest/unittest.dart';
17 14
18 main() { 15 main() {
19 useCompactVMConfiguration(); 16 useCompactVMConfiguration();
20 17
21 18
22 Future testAssetUri(String name, 19 void testAssetUri(String name,
23 {AssetId source, String uri, AssetId result, String message, 20 {AssetId source, String uri, AssetId result, String message,
24 bool errorOnAbsolute: true}) { 21 bool errorOnAbsolute: true}) {
25 test(name, () { 22 test(name, () {
26 var transformer = new Validator((transform) { 23 var transformer = new Validator((transform) {
27 var assetId = uriToAssetId(source, uri, transform.logger, null, 24 var assetId = uriToAssetId(source, uri, transform.logger, null,
28 errorOnAbsolute: errorOnAbsolute); 25 errorOnAbsolute: errorOnAbsolute);
29 expect(assetId, result); 26 expect(assetId, result);
30 }); 27 });
31 var messages = []; 28 var messages = [];
32 if (message != null) messages.add(message); 29 if (message != null) messages.add(message);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 final Function validation; 98 final Function validation;
102 99
103 Validator(this.validation); 100 Validator(this.validation);
104 101
105 Future<bool> isPrimary(Asset input) => new Future.value(true); 102 Future<bool> isPrimary(Asset input) => new Future.value(true);
106 103
107 Future apply(Transform transform) { 104 Future apply(Transform transform) {
108 return new Future.value(validation(transform)); 105 return new Future.value(validation(transform));
109 } 106 }
110 } 107 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698