OLD | NEW |
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 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 const char* kScriptChars = | 904 const char* kScriptChars = |
905 "class Fields {\n" | 905 "class Fields {\n" |
906 " Fields(int i, int j) : fld1 = i, fld2 = j {}\n" | 906 " Fields(int i, int j) : fld1 = i, fld2 = j {}\n" |
907 " int fld1;\n" | 907 " int fld1;\n" |
908 " final int fld2;\n" | 908 " final int fld2;\n" |
909 " final int bigint_fld = 0xfffffffffff;\n" | 909 " final int bigint_fld = 0xfffffffffff;\n" |
910 " static int fld3;\n" | 910 " static int fld3;\n" |
911 " static const int smi_sfld = 10;\n" | 911 " static const int smi_sfld = 10;\n" |
912 " static const int bigint_sfld = 0xfffffffffff;\n" | 912 " static const int bigint_sfld = 0xfffffffffff;\n" |
913 "}\n" | 913 "}\n" |
914 "class Expect {\n" | |
915 " static void equals(x, y) {\n" | |
916 " if (x != y) throw new RuntimeError('not equal');\n" | |
917 " }\n" | |
918 "}\n" | |
919 "class FieldsTest {\n" | 914 "class FieldsTest {\n" |
920 " static Fields testMain() {\n" | 915 " static Fields testMain() {\n" |
921 " Expect.equals(true, Fields.bigint_sfld == 0xfffffffffff);\n" | 916 " Expect.equals(true, Fields.bigint_sfld == 0xfffffffffff);\n" |
922 " Fields obj = new Fields(10, 20);\n" | 917 " Fields obj = new Fields(10, 20);\n" |
923 " Expect.equals(true, obj.bigint_fld == 0xfffffffffff);\n" | 918 " Expect.equals(true, obj.bigint_fld == 0xfffffffffff);\n" |
924 " return obj;\n" | 919 " return obj;\n" |
925 " }\n" | 920 " }\n" |
926 "}\n"; | 921 "}\n"; |
927 Dart_Handle result; | 922 Dart_Handle result; |
928 | 923 |
(...skipping 1275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2204 EXPECT(Dart_ErrorHasException(result)); | 2199 EXPECT(Dart_ErrorHasException(result)); |
2205 EXPECT_SUBSTRING("Exception: nulltruefalse123456æøå3.14[]100123456789\n", | 2200 EXPECT_SUBSTRING("Exception: nulltruefalse123456æøå3.14[]100123456789\n", |
2206 Dart_GetError(result)); | 2201 Dart_GetError(result)); |
2207 | 2202 |
2208 Dart_ExitScope(); | 2203 Dart_ExitScope(); |
2209 } | 2204 } |
2210 | 2205 |
2211 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). | 2206 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). |
2212 | 2207 |
2213 } // namespace dart | 2208 } // namespace dart |
OLD | NEW |