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

Side by Side Diff: runtime/vm/snapshot_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, 3 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
« no previous file with comments | « runtime/vm/parser_test.cc ('k') | runtime/vm/snapshot_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "include/dart_debugger_api.h" 5 #include "include/dart_debugger_api.h"
6 #include "platform/assert.h" 6 #include "platform/assert.h"
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/class_finalizer.h" 8 #include "vm/class_finalizer.h"
9 #include "vm/dart_api_impl.h" 9 #include "vm/dart_api_impl.h"
10 #include "vm/dart_api_message.h" 10 #include "vm/dart_api_message.h"
(...skipping 758 matching lines...) Expand 10 before | Expand all | Expand 10 after
769 // Only ia32 and x64 can run execution tests. 769 // Only ia32 and x64 can run execution tests.
770 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) 770 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64)
771 UNIT_TEST_CASE(FullSnapshot) { 771 UNIT_TEST_CASE(FullSnapshot) {
772 const char* kScriptChars = 772 const char* kScriptChars =
773 "class Fields {\n" 773 "class Fields {\n"
774 " Fields(int i, int j) : fld1 = i, fld2 = j {}\n" 774 " Fields(int i, int j) : fld1 = i, fld2 = j {}\n"
775 " int fld1;\n" 775 " int fld1;\n"
776 " final int fld2;\n" 776 " final int fld2;\n"
777 " final int bigint_fld = 0xfffffffffff;\n" 777 " final int bigint_fld = 0xfffffffffff;\n"
778 " static int fld3;\n" 778 " static int fld3;\n"
779 " static final int smi_sfld = 10;\n" 779 " static const int smi_sfld = 10;\n"
780 " static final int bigint_sfld = 0xfffffffffff;\n" 780 " static const int bigint_sfld = 0xfffffffffff;\n"
781 "}\n" 781 "}\n"
782 "class FieldsTest {\n" 782 "class FieldsTest {\n"
783 " static Fields testMain() {\n" 783 " static Fields testMain() {\n"
784 " Expect.equals(true, Fields.bigint_sfld == 0xfffffffffff);\n" 784 " Expect.equals(true, Fields.bigint_sfld == 0xfffffffffff);\n"
785 " Fields obj = new Fields(10, 20);\n" 785 " Fields obj = new Fields(10, 20);\n"
786 " Expect.equals(true, obj.bigint_fld == 0xfffffffffff);\n" 786 " Expect.equals(true, obj.bigint_fld == 0xfffffffffff);\n"
787 " return obj;\n" 787 " return obj;\n"
788 " }\n" 788 " }\n"
789 "}\n"; 789 "}\n";
790 Dart_Handle result; 790 Dart_Handle result;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 " LibFields(int i, int j) : fld1 = i, fld2 = j {}" 902 " LibFields(int i, int j) : fld1 = i, fld2 = j {}"
903 " int fld1;" 903 " int fld1;"
904 " final int fld2;" 904 " final int fld2;"
905 "}"; 905 "}";
906 const char* kScriptChars = 906 const char* kScriptChars =
907 "class Fields {" 907 "class Fields {"
908 " Fields(int i, int j) : fld1 = i, fld2 = j {}" 908 " Fields(int i, int j) : fld1 = i, fld2 = j {}"
909 " int fld1;" 909 " int fld1;"
910 " final int fld2;" 910 " final int fld2;"
911 " static int fld3;" 911 " static int fld3;"
912 " static final int fld4 = 10;" 912 " static const int fld4 = 10;"
913 "}" 913 "}"
914 "class FieldsTest {" 914 "class FieldsTest {"
915 " static Fields testMain() {" 915 " static Fields testMain() {"
916 " Fields obj = new Fields(10, 20);" 916 " Fields obj = new Fields(10, 20);"
917 " Fields.fld3 = 100;" 917 " Fields.fld3 = 100;"
918 " if (obj === null) {" 918 " if (obj === null) {"
919 " throw new Exception('Allocation failure');" 919 " throw new Exception('Allocation failure');"
920 " }" 920 " }"
921 " if (obj.fld1 != 10) {" 921 " if (obj.fld1 != 10) {"
922 " throw new Exception('fld1 needs to be 10');" 922 " throw new Exception('fld1 needs to be 10');"
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1520 EXPECT(Dart_ErrorHasException(result)); 1520 EXPECT(Dart_ErrorHasException(result));
1521 EXPECT_SUBSTRING("Exception: nulltruefalse1234563.14[]100123456789\n", 1521 EXPECT_SUBSTRING("Exception: nulltruefalse1234563.14[]100123456789\n",
1522 Dart_GetError(result)); 1522 Dart_GetError(result));
1523 1523
1524 Dart_ExitScope(); 1524 Dart_ExitScope();
1525 } 1525 }
1526 1526
1527 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). 1527 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64).
1528 1528
1529 } // namespace dart 1529 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/parser_test.cc ('k') | runtime/vm/snapshot_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698