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

Unified Diff: test/testing.dart

Issue 12016007: Add a warning about using a component that isn't referenced (Closed) Base URL: https://github.com/dart-lang/web-ui.git@master
Patch Set: Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« test/analyzer_test.dart ('K') | « test/analyzer_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/testing.dart
diff --git a/test/testing.dart b/test/testing.dart
index 6aa81a074a7dae0abf2b3affce71f7963098856c..ac86f993f1952b52b446ad47c4f4ca0447afca0d 100644
--- a/test/testing.dart
+++ b/test/testing.dart
@@ -21,13 +21,11 @@ Document parseDocument(String html) => parse(html);
Element parseSubtree(String html) => parseFragment(html).nodes[0];
ElementInfo analyzeElement(Element elem, {Messages messages}) {
- messages = messages == null ? new Messages.silent() : messages;
var fileInfo = analyzeNodeForTesting(elem, messages: messages);
return fileInfo.bodyInfo;
}
FileInfo analyzeDefinitionsInTree(Document doc, {Messages messages}) {
- messages = messages == null ? new Messages.silent() : messages;
return analyzeDefinitions(
new SourceFile(new Path(''))..document = doc, messages: messages
);
@@ -48,17 +46,19 @@ List<SourceFile> parseFiles(Map<String, String> fileContents,
}
/** Analyze all files. */
-Map<String, FileInfo> analyzeFiles(List<SourceFile> files) {
+Map<String, FileInfo> analyzeFiles(List<SourceFile> files,
+ {Messages messages}) {
+
var result = new Map<Path, FileInfo>();
// analyze definitions
for (var file in files) {
- result[file.path] = analyzeDefinitions(file);
+ result[file.path] = analyzeDefinitions(file, messages: messages);
}
// analyze file contents
var uniqueIds = new IntIterator();
for (var file in files) {
- analyzeFile(file, result, uniqueIds);
+ analyzeFile(file, result, uniqueIds, messages: messages);
}
return _toStringMap(result);
}
« test/analyzer_test.dart ('K') | « test/analyzer_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698