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

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

Issue 14732003: Implement Model-Driven-Views spec for Dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: try upload again 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/mdv_observe_impl/mdv_observe_impl.dart ('k') | tests/html/binding_syntax_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) 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.
ahe 2013/05/15 12:46:00 This change is not cool. By supressing this warni
Jennifer Messerly 2013/05/15 17:59:30 This is not correct. "new Symbol" is only required
31 };
30 32
31 class CollectingDiagnosticHandler extends FormattingDiagnosticHandler { 33 class CollectingDiagnosticHandler extends FormattingDiagnosticHandler {
32 bool hasWarnings = false; 34 bool hasWarnings = false;
33 bool hasErrors = false; 35 bool hasErrors = false;
34 36
35 Map<String,Map<String,int>> whiteListMap = new Map<String,Map<String,int>>(); 37 Map<String,Map<String,int>> whiteListMap = new Map<String,Map<String,int>>();
36 38
37 CollectingDiagnosticHandler(SourceFileProvider provider) : super(provider) { 39 CollectingDiagnosticHandler(SourceFileProvider provider) : super(provider) {
38 WHITE_LIST.forEach((String file, List<String> messageParts) { 40 WHITE_LIST.forEach((String file, List<String> messageParts) {
39 var useMap = new Map<String,int>(); 41 var useMap = new Map<String,int>();
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 libraryRoot, libraryRoot, 125 libraryRoot, libraryRoot,
124 <String>['--analyze-only', '--analyze-all', 126 <String>['--analyze-only', '--analyze-all',
125 '--categories=Client,Server']); 127 '--categories=Client,Server']);
126 compiler.librariesToAnalyzeWhenRun = uriList; 128 compiler.librariesToAnalyzeWhenRun = uriList;
127 compiler.run(null); 129 compiler.run(null);
128 Expect.isFalse(handler.hasWarnings); 130 Expect.isFalse(handler.hasWarnings);
129 Expect.isFalse(handler.hasErrors); 131 Expect.isFalse(handler.hasErrors);
130 Expect.isTrue(handler.checkWhiteListUse()); 132 Expect.isTrue(handler.checkWhiteListUse());
131 handler.reportWhiteListUse(); 133 handler.reportWhiteListUse();
132 } 134 }
OLDNEW
« no previous file with comments | « sdk/lib/mdv_observe_impl/mdv_observe_impl.dart ('k') | tests/html/binding_syntax_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698