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

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

Issue 10876036: Extend testing of metadata. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed missing import Created 8 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 | Annotate | Revision Log
« no previous file with comments | « dart/tests/compiler/dart2js/metadata_test.dart ('k') | no next file » | 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) 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('dart:uri'); 5 #import('dart:uri');
6 6
7 #import("../../../lib/compiler/implementation/leg.dart"); 7 #import("../../../lib/compiler/implementation/leg.dart");
8 #import("../../../lib/compiler/implementation/elements/elements.dart"); 8 #import("../../../lib/compiler/implementation/elements/elements.dart");
9 #import("../../../lib/compiler/implementation/tree/tree.dart"); 9 #import("../../../lib/compiler/implementation/tree/tree.dart");
10 #import("../../../lib/compiler/implementation/scanner/scannerlib.dart"); 10 #import("../../../lib/compiler/implementation/scanner/scannerlib.dart");
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 resolveConstructor(script, "Object o = new Object();", "Object", "Object", 1, 711 resolveConstructor(script, "Object o = new Object();", "Object", "Object", 1,
712 [], [MessageKind.SUPER_INITIALIZER_IN_OBJECT], 712 [], [MessageKind.SUPER_INITIALIZER_IN_OBJECT],
713 corelib: CORELIB_WITH_INVALID_OBJECT); 713 corelib: CORELIB_WITH_INVALID_OBJECT);
714 } 714 }
715 715
716 map(ResolverVisitor visitor) { 716 map(ResolverVisitor visitor) {
717 TreeElementMapping elements = visitor.mapping; 717 TreeElementMapping elements = visitor.mapping;
718 return elements.map; 718 return elements.map;
719 } 719 }
720 720
721 length(Link link) => link.isEmpty() ? 0 : length(link.tail) + 1;
722
723 at(Link link, int index) => (index == 0) ? link.head : at(link.tail, index - 1); 721 at(Link link, int index) => (index == 0) ? link.head : at(link.tail, index - 1);
724 722
725 List<String> asSortedStrings(Link link) { 723 List<String> asSortedStrings(Link link) {
726 List<String> result = <String>[]; 724 List<String> result = <String>[];
727 for (; !link.isEmpty(); link = link.tail) result.add(link.head.toString()); 725 for (; !link.isEmpty(); link = link.tail) result.add(link.head.toString());
728 result.sort((s1, s2) => s1.compareTo(s2)); 726 result.sort((s1, s2) => s1.compareTo(s2));
729 return result; 727 return result;
730 } 728 }
731 729
732 compileScript(String source) { 730 compileScript(String source) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 var d = new D(); 781 var d = new D();
784 --d; 782 --d;
785 }"""; 783 }""";
786 final compiler = compileScript(script); 784 final compiler = compileScript(script);
787 785
788 checkMemberResolved(compiler, 'A', operatorName('+')); 786 checkMemberResolved(compiler, 'A', operatorName('+'));
789 checkMemberResolved(compiler, 'B', operatorName('+')); 787 checkMemberResolved(compiler, 'B', operatorName('+'));
790 checkMemberResolved(compiler, 'C', operatorName('-')); 788 checkMemberResolved(compiler, 'C', operatorName('-'));
791 checkMemberResolved(compiler, 'D', operatorName('-')); 789 checkMemberResolved(compiler, 'D', operatorName('-'));
792 } 790 }
OLDNEW
« no previous file with comments | « dart/tests/compiler/dart2js/metadata_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698