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

Unified Diff: runtime/vm/dart_api_impl_test.cc

Issue 10883071: - Change "static final" to "static const" in the runtime/ 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
Index: runtime/vm/dart_api_impl_test.cc
===================================================================
--- runtime/vm/dart_api_impl_test.cc (revision 11416)
+++ runtime/vm/dart_api_impl_test.cc (working copy)
@@ -2544,8 +2544,8 @@
" final _final_instance_fld;\n"
" static var static_fld;\n"
" static var _static_fld;\n"
- " static final final_static_fld = 'final static';\n"
- " static final _final_static_fld = 'hidden final static';\n"
+ " static const final_static_fld = 'final static';\n"
+ " static const _final_static_fld = 'hidden final static';\n"
"\n"
" get instance_getset_fld() { return _gs_fld1; }\n"
" void set instance_getset_fld(var value) { _gs_fld1 = value; }\n"
@@ -2674,7 +2674,7 @@
TestFieldNotFound(instance, name);
TestFieldOk(cls, name, true, "final static");
- // Hidden static final field.
+ // Hidden static const field.
name = Dart_NewString("_final_static_fld");
hausner 2012/08/27 22:12:04 In our own code, we should fix outdated function n
Ivan Posva 2012/08/27 23:49:49 Done.
TestFieldNotFound(lib, name);
TestFieldNotFound(instance, name);
@@ -2813,7 +2813,7 @@
" int fld1;\n"
" final int fld2;\n"
" static int fld3;\n"
- " static final int fld4 = 10;\n"
+ " static const int fld4 = 10;\n"
"}\n"
"NativeFields testMain() {\n"
" NativeFields obj = new NativeFields(10, 20);\n"
@@ -2862,7 +2862,7 @@
" int fld1;\n"
" final int fld2;\n"
" static int fld3;\n"
- " static final int fld4 = 10;\n"
+ " static const int fld4 = 10;\n"
"}\n"
"NativeFields testMain() {\n"
" NativeFields obj = new NativeFields(10, 20);\n"
@@ -2890,7 +2890,7 @@
" int fld1;\n"
" final int fld2;\n"
" static int fld3;\n"
- " static final int fld4 = 10;\n"
+ " static const int fld4 = 10;\n"
"}\n"
"NativeFields testMain() {\n"
" NativeFields obj = new NativeFields(10, 20);\n"
@@ -2931,7 +2931,7 @@
" int fld1;\n"
" final int fld2;\n"
" static int fld3;\n"
- " static final int fld4 = 10;\n"
+ " static const int fld4 = 10;\n"
"}\n"
"NativeFields testMain() {\n"
" NativeFields obj = new NativeFields(10, 20);\n"
@@ -3043,7 +3043,7 @@
" int fld1;\n"
" final int fld2;\n"
" static int fld3;\n"
- " static final int fld4 = 10;\n"
+ " static const int fld4 = 10;\n"
"}\n"
"NativeFields testMain() {\n"
" NativeFields obj = new NativeFields(10, 20);\n"
@@ -3094,7 +3094,7 @@
" int fld1;\n"
" final int fld2;\n"
" static int fld3;\n"
- " static final int fld4 = 10;\n"
+ " static const int fld4 = 10;\n"
"}\n"
"NativeFields testMain() {\n"
" NativeFields obj = new NativeFields(10, 20);\n"
@@ -3120,7 +3120,7 @@
" int fld1;\n"
" final int fld2;\n"
" static int fld3;\n"
- " static final int fld4 = 10;\n"
+ " static const int fld4 = 10;\n"
"}\n"
"NativeFields testMain1() {\n"
" NativeFields obj = new NativeFields(10, 20);\n"
@@ -3187,7 +3187,7 @@
TEST_CASE(GetStaticField_RunsInitializer) {
const char* kScriptChars =
"class TestClass {\n"
- " static final int fld1 = 7;\n"
+ " static const int fld1 = 7;\n"
" static int fld2 = 11;\n"
" static void testMain() {\n"
" }\n"
@@ -3904,7 +3904,7 @@
" }\n"
" int fld1;\n"
" final int fld2;\n"
- " static final int fld4 = 10;\n"
+ " static const int fld4 = 10;\n"
"}\n"
"Function testMain1() {\n"
" InvokeClosure obj = new InvokeClosure(10, 20);\n"
@@ -4541,8 +4541,8 @@
" final _d = '_d';\n"
" static var e = 'e';\n"
" static var _f = '_f';\n"
- " static final g = 'g';\n"
- " static final _h = '_h';\n"
+ " static const g = 'g';\n"
+ " static const _h = '_h';\n"
"}\n";
Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
@@ -4565,14 +4565,14 @@
BuildVariableDescription(&buffer, var);
EXPECT_STREQ("_b static", buffer.buf());
- // Lookup a final top-level variable.
+ // Lookup a const top-level variable.
var = Dart_LookupVariable(lib, Dart_NewString("c"));
EXPECT_VALID(var);
EXPECT(Dart_IsVariable(var));
BuildVariableDescription(&buffer, var);
EXPECT_STREQ("c static final", buffer.buf());
- // Lookup a private final top-level variable.
+ // Lookup a private const top-level variable.
var = Dart_LookupVariable(lib, Dart_NewString("_d"));
EXPECT_VALID(var);
EXPECT(Dart_IsVariable(var));
@@ -4621,14 +4621,14 @@
BuildVariableDescription(&buffer, var);
EXPECT_STREQ("_f static", buffer.buf());
- // Lookup a final static variable.
+ // Lookup a const static variable.
var = Dart_LookupVariable(cls, Dart_NewString("g"));
EXPECT_VALID(var);
EXPECT(Dart_IsVariable(var));
BuildVariableDescription(&buffer, var);
EXPECT_STREQ("g static final", buffer.buf());
- // Lookup a private final static variable.
+ // Lookup a private const static variable.
var = Dart_LookupVariable(cls, Dart_NewString("_h"));
EXPECT_VALID(var);
EXPECT(Dart_IsVariable(var));
« no previous file with comments | « runtime/lib/regexp_patch.dart ('k') | runtime/vm/parser.cc » ('j') | runtime/vm/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698