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 import 'package:async_helper/async_helper.dart'; | 5 import 'package:async_helper/async_helper.dart'; |
6 import 'package:compiler/implementation/constants/values.dart' | 6 import 'package:compiler/src/constants/values.dart' |
7 show PrimitiveConstantValue; | 7 show PrimitiveConstantValue; |
8 import 'package:expect/expect.dart'; | 8 import 'package:expect/expect.dart'; |
9 import 'compiler_helper.dart'; | 9 import 'compiler_helper.dart'; |
10 import 'parser_helper.dart'; | 10 import 'parser_helper.dart'; |
11 | 11 |
12 void checkPosition(Spannable spannable, Node node, String source, compiler) { | 12 void checkPosition(Spannable spannable, Node node, String source, compiler) { |
13 SourceSpan span = compiler.spanFromSpannable(spannable); | 13 SourceSpan span = compiler.spanFromSpannable(spannable); |
14 Expect.isTrue(span.begin < span.end, | 14 Expect.isTrue(span.begin < span.end, |
15 'begin = ${span.begin}; end = ${span.end}'); | 15 'begin = ${span.begin}; end = ${span.end}'); |
16 Expect.isTrue(span.end < source.length, | 16 Expect.isTrue(span.end < source.length, |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 compileAndCheckLibrary(source, | 211 compileAndCheckLibrary(source, |
212 (e) => e.compilationUnits.first.partTag.metadata); | 212 (e) => e.compilationUnits.first.partTag.metadata); |
213 } | 213 } |
214 | 214 |
215 void main() { | 215 void main() { |
216 testClassMetadata(); | 216 testClassMetadata(); |
217 testTopLevelMethodMetadata(); | 217 testTopLevelMethodMetadata(); |
218 testTopLevelFieldMetadata(); | 218 testTopLevelFieldMetadata(); |
219 testLibraryTags(); | 219 testLibraryTags(); |
220 } | 220 } |
OLD | NEW |