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

Unified Diff: test/codegen/expect/language/throw6_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
« no previous file with comments | « test/codegen/expect/language/throw5_test.js ('k') | test/codegen/expect/language/throw8_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/language/throw6_test.js
diff --git a/test/codegen/expect/language/throw6_test.js b/test/codegen/expect/language/throw6_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..481db05abc48ed635a208d83c15b70f65877c9af
--- /dev/null
+++ b/test/codegen/expect/language/throw6_test.js
@@ -0,0 +1,75 @@
+dart_library.library('language/throw6_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__throw6_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 throw6_test = Object.create(null);
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ throw6_test.MyException1 = class MyException1 extends core.Object {
+ new(message) {
+ if (message === void 0) message = "1";
+ this.message_ = message;
+ }
+ };
+ dart.setSignature(throw6_test.MyException1, {
+ constructors: () => ({new: dart.definiteFunctionType(throw6_test.MyException1, [], [core.String])})
+ });
+ throw6_test.Helper = class Helper extends core.Object {
+ new() {
+ this.i = 0;
+ }
+ f1() {
+ let j = 0;
+ try {
+ j = this.func();
+ } catch (exception) {
+ this.i = dart.notNull(this.i) + 100;
+ core.print(dart.dload(exception, 'message_'));
+ }
+ finally {
+ this.i = dart.notNull(this.i) + 1000;
+ }
+ return this.i;
+ }
+ func() {
+ this.i = 0;
+ try {
+ while (dart.notNull(this.i) < 10) {
+ this.i = dart.notNull(this.i) + 1;
+ }
+ if (dart.notNull(this.i) > 0) {
+ dart.throw(new throw6_test.MyException1("Test for MyException1 being thrown"));
+ }
+ } finally {
+ this.i = 800;
+ }
+ return this.i;
+ }
+ };
+ dart.setSignature(throw6_test.Helper, {
+ constructors: () => ({new: dart.definiteFunctionType(throw6_test.Helper, [])}),
+ methods: () => ({
+ f1: dart.definiteFunctionType(core.int, []),
+ func: dart.definiteFunctionType(core.int, [])
+ })
+ });
+ throw6_test.Throw6Test = class Throw6Test extends core.Object {
+ static testMain() {
+ expect$.Expect.equals(1900, new throw6_test.Helper().f1());
+ }
+ };
+ dart.setSignature(throw6_test.Throw6Test, {
+ statics: () => ({testMain: dart.definiteFunctionType(dart.dynamic, [])}),
+ names: ['testMain']
+ });
+ throw6_test.main = function() {
+ throw6_test.Throw6Test.testMain();
+ };
+ dart.fn(throw6_test.main, VoidTodynamic());
+ // Exports:
+ exports.throw6_test = throw6_test;
+});
« no previous file with comments | « test/codegen/expect/language/throw5_test.js ('k') | test/codegen/expect/language/throw8_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698