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

Unified Diff: tests/language/ct_const_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: Updated cf. comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/language/ct_const4_test.dart ('k') | tests/language/default_init_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/ct_const_test.dart
diff --git a/tests/language/ct_const_test.dart b/tests/language/ct_const_test.dart
index 7173f384108b64effb28b878233dcd2d41ec31dc..ed121c813fcddbbac45cdbcbc557125dabce5353 100644
--- a/tests/language/ct_const_test.dart
+++ b/tests/language/ct_const_test.dart
@@ -4,21 +4,21 @@
// All things regarding compile time constant expressions.
interface Roman {
- static final I = 1;
- static final II = 2;
- static final III = 3;
- static final IV = 4;
- static final V = 5;
+ static const I = 1;
+ static const II = 2;
+ static const III = 3;
+ static const IV = 4;
+ static const V = 5;
- static final VivaItalia = const {"green": 1, "red": 3, "white": 2};
+ static const VivaItalia = const {"green": 1, "red": 3, "white": 2};
}
class Point {
- static final int zero = 0;
+ static const int zero = 0;
- static final origin = const Point(0, 0);
- static final origin2 = const Point(zero, Roman.IV - 4);
+ static const origin = const Point(0, 0);
+ static const origin2 = const Point(zero, Roman.IV - 4);
const Point(x, y) : x_= x, y_ = y;
const Point.X(x) : x_ = x, y_ = Roman.V - Roman.II - 3;
@@ -40,7 +40,7 @@ class Line {
class CTConstTest {
static int getZero() { return 0; }
- static final naught = null;
+ static const naught = null;
static testMain() {
Expect.equals(0, Point.zero);
« no previous file with comments | « tests/language/ct_const4_test.dart ('k') | tests/language/default_init_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698