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

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

Issue 11361190: a === b -> identical(a, b) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address 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
« no previous file with comments | « tests/standalone/io/web_socket_test.dart ('k') | tests/utils/utf8_test.dart » ('j') | 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 // Smoke test of the dart2js compiler API. 5 // Smoke test of the dart2js compiler API.
6 6
7 import '../../sdk/lib/_internal/compiler/compiler.dart'; 7 import '../../sdk/lib/_internal/compiler/compiler.dart';
8 import 'dart:uri'; 8 import 'dart:uri';
9 9
10 Future<String> provider(Uri uri) { 10 Future<String> provider(Uri uri) {
(...skipping 29 matching lines...) Expand all
40 source = "#library('lib');"; 40 source = "#library('lib');";
41 } 41 }
42 } else { 42 } else {
43 throw "unexpected URI $uri"; 43 throw "unexpected URI $uri";
44 } 44 }
45 completer.complete(source); 45 completer.complete(source);
46 return completer.future; 46 return completer.future;
47 } 47 }
48 48
49 void handler(Uri uri, int begin, int end, String message, Diagnostic kind) { 49 void handler(Uri uri, int begin, int end, String message, Diagnostic kind) {
50 if (uri === null) { 50 if (uri == null) {
51 print('$kind: $message'); 51 print('$kind: $message');
52 } else { 52 } else {
53 print('$uri:$begin:$end: $kind: $message'); 53 print('$uri:$begin:$end: $kind: $message');
54 } 54 }
55 } 55 }
56 56
57 main() { 57 main() {
58 String code = compile(new Uri.fromComponents(scheme: 'main'), 58 String code = compile(new Uri.fromComponents(scheme: 'main'),
59 new Uri.fromComponents(scheme: 'lib', path: '/'), 59 new Uri.fromComponents(scheme: 'lib', path: '/'),
60 new Uri.fromComponents(scheme: 'package', path: '/'), 60 new Uri.fromComponents(scheme: 'package', path: '/'),
61 provider, handler).value; 61 provider, handler).value;
62 if (code === null) { 62 if (code == null) {
63 throw 'Compilation failed'; 63 throw 'Compilation failed';
64 } 64 }
65 } 65 }
OLDNEW
« no previous file with comments | « tests/standalone/io/web_socket_test.dart ('k') | tests/utils/utf8_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698