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

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

Issue 979813002: Support simple try in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. 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
« no previous file with comments | « pkg/analyzer2dart/test/end2end_data.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer2dart/test/sexpr_data.dart
diff --git a/pkg/analyzer2dart/test/sexpr_data.dart b/pkg/analyzer2dart/test/sexpr_data.dart
index d380c6d1d358d7cd4c62d070ea7e911dc6cae578..e52af4dc558fa665299108eb385df72eee6f743b 100644
--- a/pkg/analyzer2dart/test/sexpr_data.dart
+++ b/pkg/analyzer2dart/test/sexpr_data.dart
@@ -1505,4 +1505,40 @@ main() {
(InvokeContinuation return (v0))))
'''}),
]),
+
+
+ const Group('Try-catch', const <TestSpec>[
+ const TestSpec('''
+main() {
+ try {} catch (e) {}
+}
+''',
+'''
+(FunctionDefinition main () return
+ (LetCont ((k0 ()
+ (LetPrim (v0 (Constant (Null)))
+ (InvokeContinuation return (v0)))))
+ (LetHandler ((v1 v2)
+ (InvokeContinuation k0 ()))
+ (InvokeContinuation k0 ()))))
+'''),
+
+ const TestSpec('''
+main() {
+ try {
+ return;
+ } catch (e) {}
+}
+''',
+'''
+(FunctionDefinition main () return
+ (LetCont ((k0 ()
+ (LetPrim (v0 (Constant (Null)))
+ (InvokeContinuation return (v0)))))
+ (LetHandler ((v1 v2)
+ (InvokeContinuation k0 ()))
+ (LetPrim (v3 (Constant (Null)))
+ (InvokeContinuation return (v3))))))
+'''),
+ ]),
];
« no previous file with comments | « pkg/analyzer2dart/test/end2end_data.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698