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

Side by Side Diff: vm/snapshot_test.cc

Issue 9835074: Fix for issue 2233 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 9 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 | « vm/snapshot.cc ('k') | no next file » | 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 761 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 bigint_fld = 0xfffffffffff;\n"
782 " static int fld3;\n" 783 " static int fld3;\n"
783 " static final int fld4 = 10;\n" 784 " static final int smi_fld = 10;\n"
785 " static final int bigint_fld = 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.bigint_fld == 0xfffffffffff);\n"
787 " Fields obj = new Fields(10, 20);\n" 790 " Fields obj = new Fields(10, 20);\n"
791 " Expect.equals(true, obj.bigint_fld == 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
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
OLDNEW
« no previous file with comments | « vm/snapshot.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698