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

Unified Diff: test/codegen/expect/language/try_catch_on_syntax_test_10_multi.js

Issue 2128353002: Check in codegen test expectations. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 5 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: test/codegen/expect/language/try_catch_on_syntax_test_10_multi.js
diff --git a/test/codegen/expect/language/try_catch_on_syntax_test_10_multi.js b/test/codegen/expect/language/try_catch_on_syntax_test_10_multi.js
new file mode 100644
index 0000000000000000000000000000000000000000..bab3aafc543ec7a3ed25b4d6fb331e142c929d02
--- /dev/null
+++ b/test/codegen/expect/language/try_catch_on_syntax_test_10_multi.js
@@ -0,0 +1,56 @@
+dart_library.library('language/try_catch_on_syntax_test_10_multi', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__try_catch_on_syntax_test_10_multi(exports, dart_sdk, expect) {
+ 'use strict';
+ const core = dart_sdk.core;
+ const dart = dart_sdk.dart;
+ const dartx = dart_sdk.dartx;
+ const expect$ = expect.expect;
+ const try_catch_on_syntax_test_10_multi = Object.create(null);
+ let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [])))();
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ try_catch_on_syntax_test_10_multi.MyException = class MyException extends core.Object {};
+ try_catch_on_syntax_test_10_multi.MyException1 = class MyException1 extends try_catch_on_syntax_test_10_multi.MyException {};
+ try_catch_on_syntax_test_10_multi.MyException2 = class MyException2 extends try_catch_on_syntax_test_10_multi.MyException {};
+ try_catch_on_syntax_test_10_multi.test1 = function() {
+ let foo = 0;
+ try {
+ dart.throw(new try_catch_on_syntax_test_10_multi.MyException1());
+ } catch (e$) {
+ if (try_catch_on_syntax_test_10_multi.MyException2.is(e$)) {
+ let e = e$;
+ foo = 1;
+ } else if (try_catch_on_syntax_test_10_multi.MyException1.is(e$)) {
+ let e = e$;
+ foo = 2;
+ } else if (try_catch_on_syntax_test_10_multi.MyException.is(e$)) {
+ let e = e$;
+ foo = 3;
+ } else {
+ let e = e$;
+ foo = 4;
+ }
+ }
+
+ expect$.Expect.equals(2, foo);
+ };
+ dart.fn(try_catch_on_syntax_test_10_multi.test1, VoidTovoid());
+ try_catch_on_syntax_test_10_multi.testFinal = function() {
+ try {
+ dart.throw("catch this!");
+ } catch (e) {
+ let s = dart.stackTrace(e);
+ e = null;
+ }
+
+ };
+ dart.fn(try_catch_on_syntax_test_10_multi.testFinal, VoidTodynamic());
+ try_catch_on_syntax_test_10_multi.main = function() {
+ try_catch_on_syntax_test_10_multi.test1();
+ try_catch_on_syntax_test_10_multi.testFinal();
+ };
+ dart.fn(try_catch_on_syntax_test_10_multi.main, VoidTodynamic());
+ // Exports:
+ exports.try_catch_on_syntax_test_10_multi = try_catch_on_syntax_test_10_multi;
+});

Powered by Google App Engine
This is Rietveld 408576698