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

Side by Side Diff: tests/utils/dummy_compiler_test.dart

Issue 19754002: Rewrite how we handle synthesized constructors in the compiler. This was motivated by issue https:/… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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
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 // VMOptions= 4 // VMOptions=
5 // VMOptions=--print-object-histogram 5 // VMOptions=--print-object-histogram
6 6
7 // Smoke test of the dart2js compiler API. 7 // Smoke test of the dart2js compiler API.
8 library dummy_compiler; 8 library dummy_compiler;
9 9
10 import 'dart:async'; 10 import 'dart:async';
11 11
12 import '../../sdk/lib/_internal/compiler/compiler.dart'; 12 import '../../sdk/lib/_internal/compiler/compiler.dart';
13 13
14 Future<String> provider(Uri uri) { 14 Future<String> provider(Uri uri) {
15 String source; 15 String source;
16 if (uri.scheme == "main") { 16 if (uri.scheme == "main") {
17 source = "main() {}"; 17 source = "main() {}";
18 } else if (uri.scheme == "lib") { 18 } else if (uri.scheme == "lib") {
19 if (uri.path.endsWith("/core.dart")) { 19 if (uri.path.endsWith("/core.dart")) {
20 source = """ 20 source = """
21 library core; 21 library core;
22 class Object { 22 class Object {
23 Object();
23 operator==(other) {} 24 operator==(other) {}
24 get hashCode => throw 'Object.hashCode not implemented.'; 25 get hashCode => throw 'Object.hashCode not implemented.';
25 } 26 }
26 class Type {} 27 class Type {}
27 class bool {} 28 class bool {}
28 class num {} 29 class num {}
29 class int {} 30 class int {}
30 class double{} 31 class double{}
31 class String{} 32 class String{}
32 class Function{} 33 class Function{}
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 new Uri(scheme: 'package', path: '/'), 107 new Uri(scheme: 'package', path: '/'),
107 provider, handler); 108 provider, handler);
108 result.then((String code) { 109 result.then((String code) {
109 if (code == null) { 110 if (code == null) {
110 throw 'Compilation failed'; 111 throw 'Compilation failed';
111 } 112 }
112 }, onError: (e) { 113 }, onError: (e) {
113 throw 'Compilation failed'; 114 throw 'Compilation failed';
114 }); 115 });
115 } 116 }
OLDNEW
« no previous file with comments | « tests/language/mixin_with_two_implicit_constructors_test.dart ('k') | tests/utils/recursive_import_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698