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

Side by Side Diff: frog/tests/leg_only/closure7_test.dart

Issue 10536169: Move frog/tests/{leg,leg_only,frog_native} to tests/compiler/. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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 | « frog/tests/leg_only/closure6_test.dart ('k') | frog/tests/leg_only/closure_capture2_test.dart » ('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 var foo;
6 bar() => foo(3, 99);
7 gee(f) => foo(fun: f);
8
9 get foo2() => foo;
10 bar2() => foo2(3, 99);
11 gee2(f) => foo2(fun: f);
12
13 globalTest() {
14 foo = () => 499;
15 Expect.equals(499, foo());
16 foo = (x, y) => x + y;
17 Expect.equals(102, bar());
18 foo = ([fun = null]) => fun(41);
19 Expect.equals(42, gee((x) => x + 1));
20
21 foo = () => 499;
22 Expect.equals(499, foo2());
23 foo = (x, y) => x + y;
24 Expect.equals(102, bar2());
25 foo = ([fun = null]) => fun(41);
26 Expect.equals(42, gee2((x) => x + 1));
27 }
28
29 class A {
30 static var foo;
31 static bar() => foo(3, 99);
32 static gee(f) => foo(fun: f);
33
34 static get foo2() => foo;
35 static bar2() => foo2(3, 99);
36 static gee2(f) => foo2(fun: f);
37 }
38
39 staticTest() {
40 A.foo = () => 499;
41 Expect.equals(499, A.foo());
42 A.foo = (x, y) => x + y;
43 Expect.equals(102, A.bar());
44 A.foo = ([fun = null]) => fun(41);
45 Expect.equals(42, A.gee((x) => x + 1));
46
47 A.foo = () => 499;
48 Expect.equals(499, A.foo2());
49 A.foo = (x, y) => x + y;
50 Expect.equals(102, A.bar2());
51 A.foo = ([fun = null]) => fun(41);
52 Expect.equals(42, A.gee2((x) => x + 1));
53 }
54
55 main() {
56 globalTest();
57 staticTest();
58 }
OLDNEW
« no previous file with comments | « frog/tests/leg_only/closure6_test.dart ('k') | frog/tests/leg_only/closure_capture2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698