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

Unified Diff: pkg/analyzer2dart/test/end2end_data.dart

Issue 979813002: Support simple try in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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: pkg/analyzer2dart/test/end2end_data.dart
diff --git a/pkg/analyzer2dart/test/end2end_data.dart b/pkg/analyzer2dart/test/end2end_data.dart
index d43963859b6af640f4ef5f6c190627b34d0ee7f2..280d06c6afa7730df53ece1b34356c03da931683 100644
--- a/pkg/analyzer2dart/test/end2end_data.dart
+++ b/pkg/analyzer2dart/test/end2end_data.dart
@@ -866,5 +866,38 @@ main() {
return new C().foo();
}
'''),
-]),
+ ]),
+
+ const Group('Try-catch', const <TestSpec>[
+ const TestSpec('''
+main() {
+ try {} catch (e) {}
+}
+''',
+// TODO(kmilikin): Remove the unused stack trace parameter.
Kevin Millikin (Google) 2015/03/04 14:45:54 kmillikin :)
Johnni Winther 2015/03/05 09:10:27 Done.
+'''
+main() {
+ try {} catch (e, v0) {}
+}
+'''),
+
+ const TestSpec('''
+main() {
+ try {
+ return;
+ } catch (e) {}
+}
+''',
+// TODO(kmilikin): Remove the unused stack trace parameter and unneeded return
+// statement(s).
+'''
+main() {
+ try {
+ return null;
+ } catch (e, v0) {
+ return null;
+ }
+}
+'''),
+ ]),
];

Powered by Google App Engine
This is Rietveld 408576698