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

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

Issue 2528043003: Handle assert with message in type inference (Closed)
Patch Set: Created 4 years, 1 month 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/inferrer/inferrer_visitor.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/assert_message_throw_test.dart
diff --git a/tests/compiler/dart2js/assert_message_throw_test.dart b/tests/compiler/dart2js/assert_message_throw_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..f453a362a73b833b4f33dc08fd99598fd9f4c13c
--- /dev/null
+++ b/tests/compiler/dart2js/assert_message_throw_test.dart
@@ -0,0 +1,23 @@
+// 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/commandline_options.dart';
+import 'memory_compiler.dart';
+
+const String SOURCE = '''
+main() {
+ assert(true, throw "unreachable");
+ var list = [];
sra1 2016/11/26 22:41:20 I don't understand what this is testing. Perhaps
Johnni Winther 2016/11/28 10:08:29 The crash reported in #27882. We had inconsistent
+}
+''';
+
+main() {
+ asyncTest(() async {
+ await runCompiler(
+ entryPoint: Uri.parse('memory:main.dart'),
+ memorySourceFiles: {'main.dart': SOURCE},
+ options: [Flags.enableCheckedMode, Flags.enableAssertMessage]);
+ });
+}
« no previous file with comments | « pkg/compiler/lib/src/inferrer/inferrer_visitor.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698