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

Side by Side Diff: tests/compiler/dart2js/metadata_test.dart

Issue 1311783012: Split parser/listener.dart, parser/class_element_listener.dart and tokens/token.dart into smaller l… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
OLDNEW
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/src/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 'package:compiler/src/parser/listener.dart' show 10 import 'package:compiler/src/parser/partial_elements.dart' show
11 PartialMetadataAnnotation; 11 PartialMetadataAnnotation;
12 12
13 void checkPosition(Spannable spannable, Node node, String source, compiler) { 13 void checkPosition(Spannable spannable, Node node, String source, compiler) {
14 SourceSpan span = compiler.spanFromSpannable(spannable); 14 SourceSpan span = compiler.spanFromSpannable(spannable);
15 Expect.isTrue(span.begin < span.end, 15 Expect.isTrue(span.begin < span.end,
16 'begin = ${span.begin}; end = ${span.end}'); 16 'begin = ${span.begin}; end = ${span.end}');
17 Expect.isTrue(span.end < source.length, 17 Expect.isTrue(span.end < source.length,
18 'end = ${span.end}; length = ${source.length}'); 18 'end = ${span.end}; length = ${source.length}');
19 String yield = source.substring(span.begin, span.end); 19 String yield = source.substring(span.begin, span.end);
20 20
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 compileAndCheckLibrary(source, 216 compileAndCheckLibrary(source,
217 (e) => e.compilationUnits.first.partTag.metadata); 217 (e) => e.compilationUnits.first.partTag.metadata);
218 } 218 }
219 219
220 void main() { 220 void main() {
221 testClassMetadata(); 221 testClassMetadata();
222 testTopLevelMethodMetadata(); 222 testTopLevelMethodMetadata();
223 testTopLevelFieldMetadata(); 223 testTopLevelFieldMetadata();
224 testLibraryTags(); 224 testLibraryTags();
225 } 225 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698