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

Side by Side Diff: tests/compiler/dart2js_extra/bailout8_test.dart

Issue 14091016: Move test to dart2js_extra since it does not apply to VM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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 | tests/compiler/dart2js_extra/dart2js_extra.status » ('j') | 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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // Test that the right exception for dart2js is thrown in the presence of
6 // bailouts.
7
5 import "package:expect/expect.dart"; 8 import "package:expect/expect.dart";
6 9
7 var a; 10 var a;
8 var b; 11 var b;
9 12
10 bar() { 13 bar() {
11 a = a == null ? 42 : new Object(); 14 a = a == null ? 42 : new Object();
12 a += b; 15 a += b;
13 } 16 }
14 17
15 foo() { 18 foo() {
16 a = a == null ? new Object() : 42; 19 a = a == null ? new Object() : 42;
17 a--; 20 a--;
18 } 21 }
19 22
20 main() { 23 main() {
21 for (int i = 0; i < 10; i++) { 24 for (int i = 0; i < 10; i++) {
22 a = null; 25 a = null;
23 Expect.throws(foo, (e) => e is NoSuchMethodError); 26 Expect.throws(foo, (e) => e is NoSuchMethodError);
24 a = null; 27 a = null;
28 // dart2js throws [ArgumentError], VM throws [NoSuchMethodError].
25 Expect.throws(bar, (e) => e is ArgumentError); 29 Expect.throws(bar, (e) => e is ArgumentError);
26 } 30 }
27 } 31 }
OLDNEW
« no previous file with comments | « no previous file | tests/compiler/dart2js_extra/dart2js_extra.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698