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

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

Issue 17825002: Remove support for 'argument definitions test' from dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove SentinelConstant. Created 7 years, 6 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/co19/co19-dart2js.status ('k') | tests/corelib/corelib.status » ('j') | 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) 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
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Test parsing and resolution of argument definition test.
6
7 int test(int a, {int b: 2, int c: 3}) {
8 int result = 0;
9 print(?b);
10 print(?result); /// 01: compile-time error
11 print(?a);
12 print(?b);
13 print(?c);
14 {
15 var b;
16 ?b; /// 02: compile-time error
17 }
18 print((!?a?!?b:!?c) == (?a??b:?c));
19 print(!?a?!?b:!?c == ?a??b:?c);
20 }
21
22 closure_test(int a, {int b: 2, int c: 3}) {
23 var x = 0;
24 return () {
25 int result = 0;
26 print(?b);
27 print(?result); /// 03: compile-time error
28 print(?x); /// 04: compile-time error
29 print(?a);
30 print(?b);
31 print(?c);
32 {
33 var b;
34 ?b; /// 05: compile-time error
35 }
36 print((!?a?!?b:!?c) == (?a??b:?c));
37 print(!?a?!?b:!?c == ?a??b:?c);
38 };
39 }
40
41 main() {
42 test(1);
43 test(1, b: 2);
44 test(1, b: 2, c: 3);
45 test(1, c: 3);
46
47 closure_test(1)();
48 closure_test(1, b: 2)();
49 closure_test(1, b: 2, c: 3)();
50 closure_test(1, c: 3)();
51 }
OLDNEW
« no previous file with comments | « tests/co19/co19-dart2js.status ('k') | tests/corelib/corelib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698