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

Unified Diff: tests/language/const_syntax_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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/language/const_init_test.dart ('k') | tests/language/final_syntax_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/const_syntax_test.dart
===================================================================
--- tests/language/const_syntax_test.dart (revision 11321)
+++ tests/language/const_syntax_test.dart (working copy)
@@ -32,10 +32,10 @@
Expect.equals("42Hello", B3); /// 10: compile-time error
}
-final F0 = 42;
-final F1; /// 03: continued
-final int F2 = 87;
-final int F3; /// 04: continued
+const F0 = 42;
+const F1; /// 03: continued
+const int F2 = 87;
+const int F3; /// 04: continued
class Point {
final x, y;
@@ -45,20 +45,20 @@
// Check that compile time expressions can include invocations of
// user-defined const constructors.
-final P0 = const Point(0, 0);
-final P1 = const Point(0, 0) + 1; /// 05: continued
-final P2 = new Point(0, 0); /// 06: continued
-final P3 = new Point(0, 0) + 1; /// 07: continued
+const P0 = const Point(0, 0);
+const P1 = const Point(0, 0) + 1; /// 05: continued
+const P2 = new Point(0, 0); /// 06: continued
+const P3 = new Point(0, 0) + 1; /// 07: continued
// Check that we cannot have cyclic references in compile time
// expressions.
-final A0 = 42;
-final A1 = A0 + 1;
-final A2 = A3 + 1; /// 08: continued
-final A3 = A2 + 1; /// 08: continued
+const A0 = 42;
+const A1 = A0 + 1;
+const A2 = A3 + 1; /// 08: continued
+const A3 = A2 + 1; /// 08: continued
class C0 {
- static final X = const C1();
+ static const X = const C1();
}
class C1 {
@@ -69,7 +69,7 @@
}
// Check that sub-expressions of binary + are numeric.
-final B0 = 42;
-final B1 = "Hello";
-final B2 = "$B1 $B0";
-final B3 = B0 + B1; /// 10: continued
+const B0 = 42;
+const B1 = "Hello";
+const B2 = "$B1 $B0";
+const B3 = B0 + B1; /// 10: continued
« no previous file with comments | « tests/language/const_init_test.dart ('k') | tests/language/final_syntax_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698