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

Unified Diff: tests/language/throw7_test.dart

Issue 23638006: Merge two static_final_field tests and rewrite a negative test to a multi-test (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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/language/throw7_test.dart
diff --git a/tests/language/throw7_test.dart b/tests/language/throw7_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..daa5655115362ac0d7f735a308698322855c4bfe
--- /dev/null
+++ b/tests/language/throw7_test.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2011, 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.
+// Dart test program for testing throw statement
+
+main() {
+ int i = 0;
+ try {
+ i = 1;
+ } catch (exception) {
+ i = 2;
+ }
+ // Since there is a generic 'catch all' statement preceding this
+ // we expect to get a dead code error/warning over here.
+ on Exception catch (exception) { i = 3; } /// 01: compile-time error
kustermann 2013/09/04 11:13:01 Does the analyzer give a warning here as well?
Søren Gjesse 2013/09/04 12:58:52 Currently it just accepts it, issue 12159.
kustermann 2013/09/04 13:03:06 If this *should* result in a warning, you should c
+}
« tests/language/static_final_field2_test.dart ('K') | « tests/language/throw7_negative_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698