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

Unified Diff: tests/language/static_const_field_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/map_literal_test.dart ('k') | tests/language/static_final_field2_negative_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/static_const_field_test.dart
===================================================================
--- tests/language/static_const_field_test.dart (revision 11321)
+++ tests/language/static_const_field_test.dart (working copy)
@@ -1,34 +1,34 @@
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// Dart test program for testing static final fields.
+// Dart test program for testing static const fields.
-interface Spain {
- static final AG = "Antoni Gaudi";
- static final SD = "Salvador Dali";
+abstract class Spain {
+ static const AG = "Antoni Gaudi";
+ static const SD = "Salvador Dali";
}
-interface Switzerland {
- static final AG = "Alberto Giacometti";
- static final LC = "Le Corbusier";
+abstract class Switzerland {
+ static const AG = "Alberto Giacometti";
+ static const LC = "Le Corbusier";
}
class A implements Switzerland {
const A() : n = 5;
final n;
- static final a = const A();
- static final b = 3 + 5;
- static final c = A.b + 7;
- static final d = const A();
- static final s1 = "hula";
- static final s2 = "hula";
- static final s3 = "hop";
- static final d1 = 1.1;
- static final d2 = 0.55 + 0.55;
- static final artist2 = Switzerland.AG;
- static final architect1 = Spain.AG;
- static final array1 = const <int>[1, 2];
- static final map1 = const {"Monday": 1, "Tuesday": 2, };
+ static const a = const A();
+ static const b = 3 + 5;
+ static const c = A.b + 7;
+ static const d = const A();
+ static const s1 = "hula";
+ static const s2 = "hula";
+ static const s3 = "hop";
+ static const d1 = 1.1;
+ static const d2 = 0.55 + 0.55;
+ static const artist2 = Switzerland.AG;
+ static const architect1 = Spain.AG;
+ static const array1 = const <int>[1, 2];
+ static const map1 = const {"Monday": 1, "Tuesday": 2, };
}
class StaticFinalFieldTest {
« no previous file with comments | « tests/language/map_literal_test.dart ('k') | tests/language/static_final_field2_negative_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698