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

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

Issue 10871071: - Change "static final" to "static const" in the tests/ directory. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 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 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 class A { 5 class A {
6 static var a; 6 static var a;
7 static var b = c; 7 static var b = c;
8 static final var c = 499; 8 static const var c = 499;
9 static final var d = c; 9 static const var d = c;
10 static final var e = d; 10 static const var e = d;
11 static final var f = B.g; 11 static const var f = B.g;
12 static final var h = true; 12 static const var h = true;
13 static final var i = false; 13 static const var i = false;
14 static final var j = n; 14 static const var j = n;
15 static final var k = 4.99; 15 static const var k = 4.99;
16 static final var l; 16 static const var l;
17 static final var m = l; 17 static const var m = l;
18 static final var n = 42; 18 static const var n = 42;
19 } 19 }
20 20
21 class B { 21 class B {
22 static final var g = A.c; 22 static const var g = A.c;
23 } 23 }
24 24
25 testInitialValues() { 25 testInitialValues() {
26 Expect.equals(null, A.a); 26 Expect.equals(null, A.a);
27 Expect.equals(499, A.b); 27 Expect.equals(499, A.b);
28 Expect.equals(499, A.c); 28 Expect.equals(499, A.c);
29 Expect.equals(499, A.d); 29 Expect.equals(499, A.d);
30 Expect.equals(499, A.e); 30 Expect.equals(499, A.e);
31 Expect.equals(499, A.f); 31 Expect.equals(499, A.f);
32 Expect.equals(499, B.g); 32 Expect.equals(499, B.g);
(...skipping 12 matching lines...) Expand all
45 A.b = 42; 45 A.b = 42;
46 Expect.equals(42, A.b); 46 Expect.equals(42, A.b);
47 Expect.equals(499, A.c); 47 Expect.equals(499, A.c);
48 Expect.equals(499, A.a); 48 Expect.equals(499, A.a);
49 } 49 }
50 50
51 main() { 51 main() {
52 testInitialValues(); 52 testInitialValues();
53 testMutation(); 53 testMutation();
54 } 54 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js_extra/compile_time_constant4_test.dart ('k') | tests/compiler/dart2js_extra/naming_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698