OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 compiler_helper; | 5 library compiler_helper; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import "package:expect/expect.dart"; | 8 import "package:expect/expect.dart"; |
9 | 9 |
10 import 'package:compiler/compiler.dart' as api; | 10 import 'package:compiler/compiler.dart' as api; |
11 | 11 |
12 import 'package:compiler/src/elements/elements.dart' | 12 import 'package:compiler/src/elements/elements.dart' |
13 as lego; | 13 as lego; |
14 export 'package:compiler/src/elements/elements.dart'; | 14 export 'package:compiler/src/elements/elements.dart'; |
15 | 15 |
16 import 'package:compiler/src/js_backend/js_backend.dart' | 16 import 'package:compiler/src/js_backend/js_backend.dart' |
17 as js; | 17 as js; |
18 | 18 |
19 import 'package:compiler/src/dart2jslib.dart' | 19 import 'package:compiler/src/dart2jslib.dart' |
20 as leg; | 20 as leg; |
21 export 'package:compiler/src/dart2jslib.dart' | 21 export 'package:compiler/src/dart2jslib.dart' |
22 show Selector, | 22 show Constant, |
23 SourceSpan; | 23 Message, |
24 | |
25 export 'package:compiler/src/messages.dart' | |
26 show Message, | |
27 MessageKind, | 24 MessageKind, |
28 MessageTemplate; | 25 MessageTemplate, |
| 26 Selector, |
| 27 TypedSelector, |
| 28 SourceSpan, |
| 29 World; |
29 | 30 |
30 import 'package:compiler/src/types/types.dart' | 31 import 'package:compiler/src/types/types.dart' |
31 as types; | 32 as types; |
32 export 'package:compiler/src/types/types.dart' | 33 export 'package:compiler/src/types/types.dart' |
33 show TypeMask; | 34 show TypeMask; |
34 | 35 |
35 import 'package:compiler/src/util/util.dart'; | 36 import 'package:compiler/src/util/util.dart'; |
36 export 'package:compiler/src/util/util.dart'; | 37 export 'package:compiler/src/util/util.dart'; |
37 | 38 |
38 import 'package:compiler/src/dart2jslib.dart' | 39 import 'package:compiler/src/dart2jslib.dart' |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 regexp = regexp.replaceAll(xRe, '(?:$anyIdentifier)'); | 261 regexp = regexp.replaceAll(xRe, '(?:$anyIdentifier)'); |
261 final spaceRe = new RegExp('\\s+'); | 262 final spaceRe = new RegExp('\\s+'); |
262 regexp = regexp.replaceAll(spaceRe, '(?:\\s*)'); | 263 regexp = regexp.replaceAll(spaceRe, '(?:\\s*)'); |
263 if (shouldMatch) { | 264 if (shouldMatch) { |
264 Expect.isTrue(new RegExp(regexp).hasMatch(generated)); | 265 Expect.isTrue(new RegExp(regexp).hasMatch(generated)); |
265 } else { | 266 } else { |
266 Expect.isFalse(new RegExp(regexp).hasMatch(generated)); | 267 Expect.isFalse(new RegExp(regexp).hasMatch(generated)); |
267 } | 268 } |
268 }); | 269 }); |
269 } | 270 } |
OLD | NEW |