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: frog/tests/leg_only/field_initializer_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
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 class A {
6 static var a;
7 static var b = c;
8 static final var c = 499;
9 static final var d = c;
10 static final var e = d;
11 static final var f = B.g;
12 static final var h = true;
13 static final var i = false;
14 static final var j = n;
15 static final var k = 4.99;
16 static final var l;
17 static final var m = l;
18 static final var n = 42;
19 }
20
21 class B {
22 static final var g = A.c;
23 }
24
25 testInitialValues() {
26 Expect.equals(null, A.a);
27 Expect.equals(499, A.b);
28 Expect.equals(499, A.c);
29 Expect.equals(499, A.d);
30 Expect.equals(499, A.e);
31 Expect.equals(499, A.f);
32 Expect.equals(499, B.g);
33 Expect.equals(true, A.h);
34 Expect.equals(false, A.i);
35 Expect.equals(42, A.j);
36 Expect.equals(4.99, A.k);
37 Expect.equals(null, A.l);
38 Expect.equals(null, A.m);
39 Expect.equals(42, A.n);
40 }
41
42 testMutation() {
43 A.a = 499;
44 Expect.equals(499, A.a);
45 A.b = 42;
46 Expect.equals(42, A.b);
47 Expect.equals(499, A.c);
48 Expect.equals(499, A.a);
49 }
50
51 main() {
52 testInitialValues();
53 testMutation();
54 }
OLDNEW
« no previous file with comments | « frog/tests/leg_only/field_in_constructor_test.dart ('k') | frog/tests/leg_only/fields_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698