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

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

Issue 10837359: Language tests updated to use const instead of final. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Instance fields are never const. 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 final g1 = true; 5 const g1 = true;
6 final g2 = 499; 6 const g2 = 499;
7 final g3 = "foo"; 7 const g3 = "foo";
8 final g4 = 3.3; 8 const g4 = 3.3;
9 final g5 = g1 == g2; 9 const g5 = g1 == g2;
10 final g6 = g1 == g3; 10 const g6 = g1 == g3;
11 final g7 = g1 == g4; 11 const g7 = g1 == g4;
12 final g8 = g2 == g3; 12 const g8 = g2 == g3;
13 final g9 = g2 == g4; 13 const g9 = g2 == g4;
14 final g10 = g3 == g4; 14 const g10 = g3 == g4;
15 final g11 = g1 == g1; 15 const g11 = g1 == g1;
16 final g12 = g2 == g2; 16 const g12 = g2 == g2;
17 final g13 = g3 == g3; 17 const g13 = g3 == g3;
18 final g14 = g4 == g4; 18 const g14 = g4 == g4;
19 19
20 main() { 20 main() {
21 Expect.isFalse(g5); 21 Expect.isFalse(g5);
22 Expect.isFalse(g6); 22 Expect.isFalse(g6);
23 Expect.isFalse(g7); 23 Expect.isFalse(g7);
24 Expect.isFalse(g8); 24 Expect.isFalse(g8);
25 Expect.isFalse(g9); 25 Expect.isFalse(g9);
26 Expect.isFalse(g10); 26 Expect.isFalse(g10);
27 Expect.isTrue(g11); 27 Expect.isTrue(g11);
28 Expect.isTrue(g12); 28 Expect.isTrue(g12);
29 Expect.isTrue(g13); 29 Expect.isTrue(g13);
30 Expect.isTrue(g14); 30 Expect.isTrue(g14);
31 } 31 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698