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

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

Issue 17977002: - Remove arguments definition test from the VM. (Closed) Base URL: http://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/argument_definition_test.dart ('k') | tests/language/language.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 import "package:expect/expect.dart"; 5 import "package:expect/expect.dart";
6 6
7 // Regression test for dart2js that used to crash on this program. 7 // Regression test for dart2js that used to crash on this program.
8 8
9 class A { 9 class A {
10 var b; 10 var b;
11 11
12 // The parameter check here used to confuse the SSA builder when it
13 // created the call to the constructor body.
14 A([Map a]) : b = ?a {
15 Expect.isTrue(b);
16 }
17
18 // The closure in the constructor body used to confuse the SSA builder 12 // The closure in the constructor body used to confuse the SSA builder
19 // when it created the call to the constructor body. 13 // when it created the call to the constructor body.
20 A.withClosure(Map a) { 14 A.withClosure(Map a) {
21 var c; 15 var c;
22 var f = () { return c = 42; }; 16 var f = () { return c = 42; };
23 b = f(); 17 b = f();
24 Expect.equals(42, b); 18 Expect.equals(42, b);
25 Expect.equals(42, c); 19 Expect.equals(42, c);
26 } 20 }
27 } 21 }
28 22
29 main() { 23 main() {
30 new A(null);
31 new A({});
32 new A.withClosure(null); 24 new A.withClosure(null);
33 new A.withClosure({}); 25 new A.withClosure({});
34 } 26 }
OLDNEW
« no previous file with comments | « tests/language/argument_definition_test.dart ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698