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

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

Issue 13084013: Handle assignability for Send and SendSet (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix dart2dart bugs. Created 7 years, 7 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 | « sdk/lib/io/http_headers.dart ('k') | tests/compiler/dart2js/mock_compiler.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 analyze_api; 5 library analyze_api;
6 6
7 import "package:expect/expect.dart"; 7 import "package:expect/expect.dart";
8 import 'dart:uri'; 8 import 'dart:uri';
9 import 'dart:io'; 9 import 'dart:io';
10 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api; 10 import '../../../sdk/lib/_internal/compiler/compiler.dart' as api;
11 import '../../../sdk/lib/_internal/compiler/implementation/apiimpl.dart'; 11 import '../../../sdk/lib/_internal/compiler/implementation/apiimpl.dart';
12 import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart' 12 import '../../../sdk/lib/_internal/compiler/implementation/dart2jslib.dart'
13 hide Compiler; 13 hide Compiler;
14 import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart'; 14 import '../../../sdk/lib/_internal/compiler/implementation/filenames.dart';
15 import '../../../sdk/lib/_internal/compiler/implementation/source_file_provider. dart'; 15 import '../../../sdk/lib/_internal/compiler/implementation/source_file_provider. dart';
16 import '../../../sdk/lib/_internal/libraries.dart'; 16 import '../../../sdk/lib/_internal/libraries.dart';
17 17
18 /** 18 /**
19 * Map of white-listed warnings and errors. 19 * Map of white-listed warnings and errors.
20 * 20 *
21 * Only add a white-listing together with a bug report to dartbug.com and add 21 * Only add a white-listing together with a bug report to dartbug.com and add
22 * the bug issue number as a comment on the white-listing. 22 * the bug issue number as a comment on the white-listing.
23 * 23 *
24 * Use an identifiable suffix of the file uri as key. Use a fixed substring of 24 * Use an identifiable suffix of the file uri as key. Use a fixed substring of
25 * the error/warning message in the list of white-listings for each file. 25 * the error/warning message in the list of white-listings for each file.
26 */ 26 */
27 // TODO(johnniwinther): Support canonical URIs as keys and message kinds as 27 // TODO(johnniwinther): Support canonical URIs as keys and message kinds as
28 // values. 28 // values.
29 const Map<String,List<String>> WHITE_LIST = const { 29 const Map<String,List<String>> WHITE_LIST = const {
30 'html_dart2js.dart': const ['Warning: Using "new Symbol"', // Issue 10565. 30 'html_dart2js.dart':
31 'Warning: unreachable code'], // Issue 10617. 31 const ['Warning: Using "new Symbol"', // Issue 10565.
32 'Warning: unreachable code', // Issue 10617.
33 // Issue 10688:
34 'Warning: no property named',
35 'Warning: WindowBase is not assignable to EventTarget',
36 "Warning: 'UnsupportedError' is not callable",
37 "Warning: no method named getBoundingClientRect",
38 "Warning: no operator [] in class Iterable"],
32 }; 39 };
33 40
34 class CollectingDiagnosticHandler extends FormattingDiagnosticHandler { 41 class CollectingDiagnosticHandler extends FormattingDiagnosticHandler {
35 bool hasWarnings = false; 42 bool hasWarnings = false;
36 bool hasErrors = false; 43 bool hasErrors = false;
37 44
38 Map<String,Map<String,int>> whiteListMap = new Map<String,Map<String,int>>(); 45 Map<String,Map<String,int>> whiteListMap = new Map<String,Map<String,int>>();
39 46
40 CollectingDiagnosticHandler(SourceFileProvider provider) : super(provider) { 47 CollectingDiagnosticHandler(SourceFileProvider provider) : super(provider) {
41 WHITE_LIST.forEach((String file, List<String> messageParts) { 48 WHITE_LIST.forEach((String file, List<String> messageParts) {
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 libraryRoot, libraryRoot, 133 libraryRoot, libraryRoot,
127 <String>['--analyze-only', '--analyze-all', 134 <String>['--analyze-only', '--analyze-all',
128 '--categories=Client,Server']); 135 '--categories=Client,Server']);
129 compiler.librariesToAnalyzeWhenRun = uriList; 136 compiler.librariesToAnalyzeWhenRun = uriList;
130 compiler.run(null); 137 compiler.run(null);
131 Expect.isFalse(handler.hasWarnings); 138 Expect.isFalse(handler.hasWarnings);
132 Expect.isFalse(handler.hasErrors); 139 Expect.isFalse(handler.hasErrors);
133 Expect.isTrue(handler.checkWhiteListUse()); 140 Expect.isTrue(handler.checkWhiteListUse());
134 handler.reportWhiteListUse(); 141 handler.reportWhiteListUse();
135 } 142 }
OLDNEW
« no previous file with comments | « sdk/lib/io/http_headers.dart ('k') | tests/compiler/dart2js/mock_compiler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698