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

Unified Diff: test/codegen/expect/language/throw8_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/throw6_test.js ('k') | test/codegen/expect/language/throw_expr_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/language/throw8_test.js
diff --git a/test/codegen/expect/language/throw8_test.js b/test/codegen/expect/language/throw8_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..6645914228ee739c9995c2ed9e1784637650f86d
--- /dev/null
+++ b/test/codegen/expect/language/throw8_test.js
@@ -0,0 +1,42 @@
+dart_library.library('language/throw8_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__throw8_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 throw8_test = Object.create(null);
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ throw8_test.finallyExecutionCount = 0;
+ throw8_test.bar = function() {
+ try {
+ try {
+ return 499;
+ } catch (e) {
+ let st = dart.stackTrace(e);
+ throw e;
+ }
+
+ } finally {
+ throw8_test.finallyExecutionCount = dart.notNull(throw8_test.finallyExecutionCount) + 1;
+ dart.throw("quit finally with throw");
+ }
+ };
+ dart.fn(throw8_test.bar, VoidTodynamic());
+ throw8_test.main = function() {
+ let hasThrown = false;
+ try {
+ throw8_test.bar();
+ } catch (x) {
+ hasThrown = true;
+ expect$.Expect.equals(1, throw8_test.finallyExecutionCount);
+ }
+
+ expect$.Expect.isTrue(hasThrown);
+ };
+ dart.fn(throw8_test.main, VoidTodynamic());
+ // Exports:
+ exports.throw8_test = throw8_test;
+});
« no previous file with comments | « test/codegen/expect/language/throw6_test.js ('k') | test/codegen/expect/language/throw_expr_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698