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

Side by Side Diff: tests/language/throw8_test.dart

Issue 19670015: Add failing throw test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/language/language.status ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4 // Dart test program for testing throw statement
5
6 import "package:expect/expect.dart";
7
8 var finallyExecutionCount = 0;
9 bar() {
10 try {
11 try {
12 return 499;
13 } catch (e, st) {
14 rethrow;
15 }
16 } finally {
17 finallyExecutionCount++;
18 throw "quit finally with throw";
19 }
20 }
21
22 main() {
23 bool hasThrown = false;
24 try {
25 bar();
26 } catch (x) {
27 hasThrown = true;
28 Expect.equals(1, finallyExecutionCount);
29 }
30 Expect.isTrue(hasThrown);
31 }
OLDNEW
« no previous file with comments | « tests/language/language.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698