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

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

Issue 2576663003: Log only valid occurences of 'All native types used ...'. (Closed)
Patch Set: dartfmt Created 4 years 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
« no previous file with comments | « pkg/compiler/lib/src/native/enqueue.dart ('k') | tests/compiler/dart2js/diagnostic_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/all_native_test.dart
diff --git a/tests/compiler/dart2js/all_native_test.dart b/tests/compiler/dart2js/all_native_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..24cbdb22978ea67c1c15a434d68350b3258be4a7
--- /dev/null
+++ b/tests/compiler/dart2js/all_native_test.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/common/names.dart';
+import 'package:compiler/src/commandline_options.dart';
+import 'package:expect/expect.dart';
+import 'memory_compiler.dart';
+
+main() {
+ asyncTest(() async {
+ DiagnosticCollector collector = new DiagnosticCollector();
+ await runCompiler(
+ entryPoint: Uris.dart_html,
+ diagnosticHandler: collector,
+ options: [Flags.analyzeAll, Flags.verbose]);
+ int allNativeUsedCount =
+ collector.verboseInfos.where((CollectedMessage message) {
+ return message.text.startsWith('All native types marked as used due to ');
+ }).length;
+ Expect.equals(
+ 1, allNativeUsedCount, "Unexpected message count: $allNativeUsedCount");
Johnni Winther 2016/12/14 09:00:10 Count before the change was 7441!
+ });
+}
« no previous file with comments | « pkg/compiler/lib/src/native/enqueue.dart ('k') | tests/compiler/dart2js/diagnostic_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698