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

Side by Side Diff: vm/snapshot_test.cc

Issue 10808064: Rename some of the enum definitions inside classes to avoid conflict with the ObjectKind enum. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years, 5 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.h ('k') | vm/stub_code_ia32_test.cc » ('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 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
721 " static bar() { return 42; }\n" 721 " static bar() { return 42; }\n"
722 " static fly() { return 5; }\n" 722 " static fly() { return 5; }\n"
723 " static s1() { return 'this is a string in the source'; }\n" 723 " static s1() { return 'this is a string in the source'; }\n"
724 " static s2() { return 'this is a \"string\" in the source'; }\n" 724 " static s2() { return 'this is a \"string\" in the source'; }\n"
725 " static s3() { return 'this is a \\\'string\\\' in \"the\" source'; }\n" 725 " static s3() { return 'this is a \\\'string\\\' in \"the\" source'; }\n"
726 " static s4() { return 'this \"is\" a \"string\" in \"the\" source'; }\n" 726 " static s4() { return 'this \"is\" a \"string\" in \"the\" source'; }\n"
727 "}\n"; 727 "}\n";
728 728
729 String& url = String::Handle(String::New("dart-test:SerializeScript")); 729 String& url = String::Handle(String::New("dart-test:SerializeScript"));
730 String& source = String::Handle(String::New(kScriptChars)); 730 String& source = String::Handle(String::New(kScriptChars));
731 Script& script = Script::Handle(Script::New(url, source, RawScript::kSource)); 731 Script& script = Script::Handle(Script::New(url,
732 source,
733 RawScript::kSourceTag));
732 const String& lib_url = String::Handle(String::NewSymbol("TestLib")); 734 const String& lib_url = String::Handle(String::NewSymbol("TestLib"));
733 Library& lib = Library::Handle(Library::New(lib_url)); 735 Library& lib = Library::Handle(Library::New(lib_url));
734 lib.Register(); 736 lib.Register();
735 EXPECT(CompilerTest::TestCompileScript(lib, script)); 737 EXPECT(CompilerTest::TestCompileScript(lib, script));
736 738
737 // Write snapshot with object content. 739 // Write snapshot with object content.
738 uint8_t* buffer; 740 uint8_t* buffer;
739 SnapshotWriter writer(Snapshot::kScript, &buffer, &malloc_allocator); 741 SnapshotWriter writer(Snapshot::kScript, &buffer, &malloc_allocator);
740 writer.WriteObject(script.raw()); 742 writer.WriteObject(script.raw());
741 writer.FinalizeBuffer(); 743 writer.FinalizeBuffer();
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
1560 EXPECT(Dart_ErrorHasException(result)); 1562 EXPECT(Dart_ErrorHasException(result));
1561 EXPECT_SUBSTRING("Exception: nulltruefalse1234563.14[]100123456789\n", 1563 EXPECT_SUBSTRING("Exception: nulltruefalse1234563.14[]100123456789\n",
1562 Dart_GetError(result)); 1564 Dart_GetError(result));
1563 1565
1564 Dart_ExitScope(); 1566 Dart_ExitScope();
1565 } 1567 }
1566 1568
1567 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64). 1569 #endif // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_X64).
1568 1570
1569 } // namespace dart 1571 } // namespace dart
OLDNEW
« no previous file with comments | « vm/snapshot.h ('k') | vm/stub_code_ia32_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698