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/resolver_test.dart

Issue 10942028: Support class and typedef literals as expressions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address Peter's comments. Created 8 years, 1 month 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) 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/dart2jslib.dart" 7 import "../../../lib/compiler/implementation/dart2jslib.dart"
8 hide TreeElementMapping, TreeElements, SourceString; 8 hide TreeElementMapping, TreeElements, SourceString;
9 import "../../../lib/compiler/implementation/resolution/resolution.dart"; 9 import "../../../lib/compiler/implementation/resolution/resolution.dart";
10 import "../../../lib/compiler/implementation/elements/elements.dart"; 10 import "../../../lib/compiler/implementation/elements/elements.dart";
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 class double {} 723 class double {}
724 class bool {} 724 class bool {}
725 class String {} 725 class String {}
726 class num {} 726 class num {}
727 class Function {} 727 class Function {}
728 class List {} 728 class List {}
729 class Map {} 729 class Map {}
730 class Closure {} 730 class Closure {}
731 class Null {} 731 class Null {}
732 class Dynamic_ {} 732 class Dynamic_ {}
733 class Type {}
733 class Object { Object() : super(); }'''; 734 class Object { Object() : super(); }''';
734 resolveConstructor(script, "Object o = new Object();", "Object", "", 1, 735 resolveConstructor(script, "Object o = new Object();", "Object", "", 1,
735 expectedWarnings: [], 736 expectedWarnings: [],
736 expectedErrors: [MessageKind.SUPER_INITIALIZER_IN_OBJECT], 737 expectedErrors: [MessageKind.SUPER_INITIALIZER_IN_OBJECT],
737 corelib: CORELIB_WITH_INVALID_OBJECT); 738 corelib: CORELIB_WITH_INVALID_OBJECT);
738 } 739 }
739 740
740 map(ResolverVisitor visitor) { 741 map(ResolverVisitor visitor) {
741 TreeElementMapping elements = visitor.mapping; 742 TreeElementMapping elements = visitor.mapping;
742 return elements.map; 743 return elements.map;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 var d = new D(); 807 var d = new D();
807 --d; 808 --d;
808 }"""; 809 }""";
809 final compiler = compileScript(script); 810 final compiler = compileScript(script);
810 811
811 checkMemberResolved(compiler, 'A', operatorName('+', false)); 812 checkMemberResolved(compiler, 'A', operatorName('+', false));
812 checkMemberResolved(compiler, 'B', operatorName('+', false)); 813 checkMemberResolved(compiler, 'B', operatorName('+', false));
813 checkMemberResolved(compiler, 'C', operatorName('-', false)); 814 checkMemberResolved(compiler, 'C', operatorName('-', false));
814 checkMemberResolved(compiler, 'D', operatorName('-', false)); 815 checkMemberResolved(compiler, 'D', operatorName('-', false));
815 } 816 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698