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

Unified Diff: tests/compiler/dart2js/analyze_unused_dart2js_test.dart

Issue 2345083003: dart2js: run dartfmt on tests (Closed)
Patch Set: revert another multipart test Created 4 years, 3 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
Index: tests/compiler/dart2js/analyze_unused_dart2js_test.dart
diff --git a/tests/compiler/dart2js/analyze_unused_dart2js_test.dart b/tests/compiler/dart2js/analyze_unused_dart2js_test.dart
index 292c2c9c09de7689aba161c24510d54605288c3e..64405872d9d4ea3f38a6124deed01f697192f9d1 100644
--- a/tests/compiler/dart2js/analyze_unused_dart2js_test.dart
+++ b/tests/compiler/dart2js/analyze_unused_dart2js_test.dart
@@ -20,36 +20,35 @@ const Map<String, List<String>> WHITE_LIST = const {
// Node.asAssert, Node.asLiteralBool is never used.
"lib/src/tree/nodes.dart": const [
- "The method 'asAssert' is never called.",
- "The method 'asLiteralBool' is never called."],
+ "The method 'asAssert' is never called.",
+ "The method 'asLiteralBool' is never called."
+ ],
// Uncalled methods in SemanticSendVisitor and subclasses.
- "lib/src/resolution/semantic_visitor.dart": const [
- "The method 'error"],
+ "lib/src/resolution/semantic_visitor.dart": const ["The method 'error"],
"lib/src/resolution/semantic_visitor_mixins.dart": const [
- "The class 'SuperBulkMixin'",
- "The class 'Base",
- "The method 'error",
- "The method 'visit"],
+ "The class 'SuperBulkMixin'",
+ "The class 'Base",
+ "The method 'error",
+ "The method 'visit"
+ ],
// Uncalled type predicate. Keep while related predicates are used.
- "lib/src/ssa/nodes.dart": const [
- "The method 'isArray' is never called"],
+ "lib/src/ssa/nodes.dart": const ["The method 'isArray' is never called"],
// Serialization code is only used in test.
- "lib/src/serialization/": const [
- "is never"],
+ "lib/src/serialization/": const ["is never"],
"lib/src/universe/universe.dart": const [
- "The method 'getterInvocationsByName' is never called.",
- "The method 'setterInvocationsByName' is never called."],
+ "The method 'getterInvocationsByName' is never called.",
+ "The method 'setterInvocationsByName' is never called."
+ ],
};
void main() {
- var uri = currentDirectory.resolve(
- 'pkg/compiler/lib/src/use_unused_api.dart');
- asyncTest(() => analyze(
- [uri],
+ var uri =
+ currentDirectory.resolve('pkg/compiler/lib/src/use_unused_api.dart');
+ asyncTest(() => analyze([uri],
// TODO(johnniwinther): Use [WHITE_LIST] again when
// [Compiler.reportUnusedCode] is reenabled.
const {}, // WHITE_LIST
@@ -58,31 +57,29 @@ void main() {
}
bool checkResults(Compiler compiler, CollectingDiagnosticHandler handler) {
- var helperUri = currentDirectory.resolve(
- 'pkg/compiler/lib/src/helpers/helpers.dart');
+ var helperUri =
+ currentDirectory.resolve('pkg/compiler/lib/src/helpers/helpers.dart');
void checkLive(member) {
if (member.isFunction) {
if (compiler.enqueuer.resolution.hasBeenProcessed(member)) {
- compiler.reporter.reportHintMessage(
- member, MessageKind.GENERIC,
+ compiler.reporter.reportHintMessage(member, MessageKind.GENERIC,
{'text': "Helper function in production code '$member'."});
}
} else if (member.isClass) {
if (member.isResolved) {
- compiler.reporter.reportHintMessage(
- member, MessageKind.GENERIC,
+ compiler.reporter.reportHintMessage(member, MessageKind.GENERIC,
{'text': "Helper class in production code '$member'."});
} else {
member.forEachLocalMember(checkLive);
}
} else if (member.isTypedef) {
if (member.isResolved) {
- compiler.reporter.reportHintMessage(
- member, MessageKind.GENERIC,
+ compiler.reporter.reportHintMessage(member, MessageKind.GENERIC,
{'text': "Helper typedef in production code '$member'."});
}
}
}
+
compiler.libraryLoader.lookupLibrary(helperUri).forEachLocalMember(checkLive);
return handler.checkResults();
}
« no previous file with comments | « tests/compiler/dart2js/analyze_test_test.dart ('k') | tests/compiler/dart2js/arithmetic_simplification_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698