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

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

Issue 10985054: Address Siva's review comment (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 | « no previous file | 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
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Dart test program for testing throw expressions. 5 // Dart test program for testing throw expressions.
6 6
7 void test1() { 7 void test1() {
8 var x = 6; 8 var x = 6;
9 try { 9 try {
10 throw x = 10; 10 throw x = 10;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 bar(x, y) => throw "foo" "${throw x}"; 44 bar(x, y) => throw "foo" "${throw x}";
45 45
46 class Q { 46 class Q {
47 var qqq; 47 var qqq;
48 f(x) { qqq = x; } 48 f(x) { qqq = x; }
49 } 49 }
50 50
51 void test3() { 51 void test3() {
52 try { 52 try {
53 throw throw throw "throw"; 53 throw throw throw "up";
54 } catch(e) { 54 } catch(e) {
55 Expect.equals("throw", e); 55 Expect.equals("up", e);
56 } 56 }
57 57
58 var x = 10; 58 var x = 10;
59 try { 59 try {
60 foo(x = 12, throw 7); 60 foo(x = 12, throw 7);
61 } catch(e) { 61 } catch(e) {
62 Expect.equals(7, e); 62 Expect.equals(7, e);
63 Expect.equals(12, x); 63 Expect.equals(12, x);
64 } 64 }
65 65
(...skipping 21 matching lines...) Expand all
87 Expect.equals(77, e); 87 Expect.equals(77, e);
88 Expect.equals(11, x.qqq); 88 Expect.equals(11, x.qqq);
89 } 89 }
90 } 90 }
91 91
92 main() { 92 main() {
93 test1(); 93 test1();
94 test2(); 94 test2();
95 test3(); 95 test3();
96 } 96 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698