Chromium Code Reviews| 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 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 772 | 772 |
| 773 | 773 |
| 774 // Only ia32 and x64 can run execution tests. | 774 // Only ia32 and x64 can run execution tests. |
| 775 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) | 775 #if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64) |
| 776 UNIT_TEST_CASE(FullSnapshot) { | 776 UNIT_TEST_CASE(FullSnapshot) { |
| 777 const char* kScriptChars = | 777 const char* kScriptChars = |
| 778 "class Fields {\n" | 778 "class Fields {\n" |
| 779 " Fields(int i, int j) : fld1 = i, fld2 = j {}\n" | 779 " Fields(int i, int j) : fld1 = i, fld2 = j {}\n" |
| 780 " int fld1;\n" | 780 " int fld1;\n" |
| 781 " final int fld2;\n" | 781 " final int fld2;\n" |
| 782 " final int fld2_1 = 0xfffffffffff;\n" | |
|
cshapiro
2012/03/24 01:48:07
maybe just name these bigintField or something jus
siva
2012/03/24 02:25:03
Done.
| |
| 782 " static int fld3;\n" | 783 " static int fld3;\n" |
| 783 " static final int fld4 = 10;\n" | 784 " static final int fld4 = 10;\n" |
|
cshapiro
2012/03/24 01:48:07
this could be smiField, etc.
siva
2012/03/24 02:25:03
Done.
| |
| 785 " static final int fld5 = 0xfffffffffff;\n" | |
| 784 "}\n" | 786 "}\n" |
| 785 "class FieldsTest {\n" | 787 "class FieldsTest {\n" |
| 786 " static Fields testMain() {\n" | 788 " static Fields testMain() {\n" |
| 789 " Expect.equals(true, Fields.fld5 == 0xfffffffffff);\n" | |
| 787 " Fields obj = new Fields(10, 20);\n" | 790 " Fields obj = new Fields(10, 20);\n" |
| 791 " Expect.equals(true, obj.fld2_1 == 0xfffffffffff);\n" | |
| 788 " return obj;\n" | 792 " return obj;\n" |
| 789 " }\n" | 793 " }\n" |
| 790 "}\n"; | 794 "}\n"; |
| 791 Dart_Handle result; | 795 Dart_Handle result; |
| 792 | 796 |
| 793 uint8_t* buffer; | 797 uint8_t* buffer; |
| 794 | 798 |
| 795 // Start an Isolate, load a script and create a full snapshot. | 799 // Start an Isolate, load a script and create a full snapshot. |
| 796 Timer timer1(true, "Snapshot_test"); | 800 Timer timer1(true, "Snapshot_test"); |
| 797 timer1.Start(); | 801 timer1.Start(); |
| (...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1558 EXPECT(Dart_ErrorHasException(result)); | 1562 EXPECT(Dart_ErrorHasException(result)); |
| 1559 EXPECT_SUBSTRING("Exception: nulltruefalse1234563.14[]100123456789\n", | 1563 EXPECT_SUBSTRING("Exception: nulltruefalse1234563.14[]100123456789\n", |
| 1560 Dart_GetError(result)); | 1564 Dart_GetError(result)); |
| 1561 | 1565 |
| 1562 Dart_ExitScope(); | 1566 Dart_ExitScope(); |
| 1563 } | 1567 } |
| 1564 | 1568 |
| 1565 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). | 1569 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). |
| 1566 | 1570 |
| 1567 } // namespace dart | 1571 } // namespace dart |
| OLD | NEW |