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

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

Issue 11416004: Reject deprecated language features. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: abstract class in resolver test 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 library mock_compiler; 5 library mock_compiler;
6 6
7 import 'dart:uri'; 7 import 'dart:uri';
8 8
9 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api; 9 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api;
10 import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart' 10 import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart'
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 const String DEFAULT_CORELIB = r''' 59 const String DEFAULT_CORELIB = r'''
60 print(var obj) {} 60 print(var obj) {}
61 abstract class num {} 61 abstract class num {}
62 abstract class int extends num { } 62 abstract class int extends num { }
63 abstract class double extends num { } 63 abstract class double extends num { }
64 class bool {} 64 class bool {}
65 class String {} 65 class String {}
66 class Object {} 66 class Object {}
67 class Type {} 67 class Type {}
68 class Function {} 68 class Function {}
69 interface List default ListImplementation { List([length]);} 69 class List {}
70 class ListImplementation { factory List([length]) => null; }
71 abstract class Map {} 70 abstract class Map {}
72 class Closure {} 71 class Closure {}
73 class Null {} 72 class Null {}
74 class Dynamic_ {} 73 class Dynamic_ {}
75 bool identical(Object a, Object b) {}'''; 74 bool identical(Object a, Object b) {}''';
76 75
77 class MockCompiler extends Compiler { 76 class MockCompiler extends Compiler {
78 List<WarningMessage> warnings; 77 List<WarningMessage> warnings;
79 List<WarningMessage> errors; 78 List<WarningMessage> errors;
80 final Map<String, SourceFile> sourceFiles; 79 final Map<String, SourceFile> sourceFiles;
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 operator []=(Node node, Element element) { 257 operator []=(Node node, Element element) {
259 map[node] = element; 258 map[node] = element;
260 } 259 }
261 260
262 operator [](Node node) => map[node]; 261 operator [](Node node) => map[node];
263 262
264 void remove(Node node) { 263 void remove(Node node) {
265 map.remove(node); 264 map.remove(node);
266 } 265 }
267 } 266 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698