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

Unified Diff: test/codegen/expect/language/execute_finally8_test.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/execute_finally8_test.js
diff --git a/test/codegen/expect/language/execute_finally8_test.js b/test/codegen/expect/language/execute_finally8_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..62690c692c717e0457a5fa252094e9c44b5254a0
--- /dev/null
+++ b/test/codegen/expect/language/execute_finally8_test.js
@@ -0,0 +1,94 @@
+dart_library.library('language/execute_finally8_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__execute_finally8_test(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 execute_finally8_test = Object.create(null);
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ execute_finally8_test.Hello = class Hello extends core.Object {
+ static foo() {
+ execute_finally8_test.Hello.sum = 0;
+ try {
+ execute_finally8_test.Hello.sum = dart.dsend(execute_finally8_test.Hello.sum, '+', 1);
+ return 'hi';
+ } finally {
+ execute_finally8_test.Hello.sum = dart.dsend(execute_finally8_test.Hello.sum, '+', 1);
+ dart.throw('ball');
+ execute_finally8_test.Hello.sum = dart.dsend(execute_finally8_test.Hello.sum, '+', 1);
+ }
+ }
+ static foo1() {
+ let loop = true;
+ execute_finally8_test.Hello.sum = 0;
+ L:
+ while (loop) {
+ try {
+ execute_finally8_test.Hello.sum = dart.dsend(execute_finally8_test.Hello.sum, '+', 1);
+ return 'hi';
+ } finally {
+ execute_finally8_test.Hello.sum = dart.dsend(execute_finally8_test.Hello.sum, '+', 1);
+ break L;
+ execute_finally8_test.Hello.sum = dart.dsend(execute_finally8_test.Hello.sum, '+', 1);
+ }
+ }
+ }
+ static foo2() {
+ let loop = true;
+ execute_finally8_test.Hello.sum = 0;
+ try {
+ execute_finally8_test.Hello.sum = dart.dsend(execute_finally8_test.Hello.sum, '+', 1);
+ return 'hi';
+ } finally {
+ execute_finally8_test.Hello.sum = dart.dsend(execute_finally8_test.Hello.sum, '+', 1);
+ return 10;
+ execute_finally8_test.Hello.sum = dart.dsend(execute_finally8_test.Hello.sum, '+', 1);
+ }
+ }
+ static foo3() {
+ execute_finally8_test.Hello.sum = 0;
+ try {
+ execute_finally8_test.Hello.sum = dart.dsend(execute_finally8_test.Hello.sum, '+', 1);
+ return 'hi';
+ } finally {
+ execute_finally8_test.Hello.sum = dart.dsend(execute_finally8_test.Hello.sum, '+', 1);
+ return 10;
+ execute_finally8_test.Hello.sum = dart.dsend(execute_finally8_test.Hello.sum, '+', 1);
+ }
+ }
+ static main() {
+ execute_finally8_test.Hello.foo1();
+ expect$.Expect.equals(2, execute_finally8_test.Hello.sum);
+ execute_finally8_test.Hello.foo2();
+ expect$.Expect.equals(2, execute_finally8_test.Hello.sum);
+ execute_finally8_test.Hello.foo3();
+ expect$.Expect.equals(2, execute_finally8_test.Hello.sum);
+ try {
+ execute_finally8_test.Hello.foo();
+ } catch (e) {
+ }
+
+ expect$.Expect.equals(2, execute_finally8_test.Hello.sum);
+ }
+ };
+ dart.setSignature(execute_finally8_test.Hello, {
+ statics: () => ({
+ foo: dart.definiteFunctionType(dart.dynamic, []),
+ foo1: dart.definiteFunctionType(dart.dynamic, []),
+ foo2: dart.definiteFunctionType(dart.dynamic, []),
+ foo3: dart.definiteFunctionType(dart.dynamic, []),
+ main: dart.definiteFunctionType(dart.void, [])
+ }),
+ names: ['foo', 'foo1', 'foo2', 'foo3', 'main']
+ });
+ execute_finally8_test.Hello.sum = null;
+ execute_finally8_test.main = function() {
+ execute_finally8_test.Hello.main();
+ };
+ dart.fn(execute_finally8_test.main, VoidTodynamic());
+ // Exports:
+ exports.execute_finally8_test = execute_finally8_test;
+});
« no previous file with comments | « test/codegen/expect/language/execute_finally7_test.js ('k') | test/codegen/expect/language/execute_finally9_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698