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

Unified Diff: runtime/vm/object_test.cc

Issue 25909002: Sampling profiler (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: runtime/vm/object_test.cc
diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc
index cba6d447f027c74ffb5fa31aaf5d0455237a0440..696a2bd1b0d9dc0e113e8dbc70f4bd1d4817e785 100644
--- a/runtime/vm/object_test.cc
+++ b/runtime/vm/object_test.cc
@@ -16,6 +16,12 @@
namespace dart {
+static RawLibrary* CreateDummyLibrary(const String& library_name) {
+ const Library& lib = Library::Handle(Library::New(library_name));
+ return lib.raw();
siva 2013/10/28 05:19:21 why not just return Library::New(library_name);
Cutch 2013/11/04 20:36:05 Done.
+}
+
+
static RawClass* CreateDummyClass(const String& class_name,
const Script& script) {
const Class& cls = Class::Handle(
@@ -2395,9 +2401,13 @@ TEST_CASE(CheckedHandle) {
static Function* CreateFunction(const char* name) {
const String& class_name = String::Handle(Symbols::New("ownerClass"));
+ const String& lib_name = String::Handle(Symbols::New("ownerLibrary"));
const Script& script = Script::Handle();
const Class& owner_class =
Class::Handle(CreateDummyClass(class_name, script));
+ const Library& owner_library =
+ Library::Handle(CreateDummyLibrary(lib_name));
+ owner_class.set_library(owner_library);
const String& function_name = String::ZoneHandle(Symbols::New(name));
Function& function = Function::ZoneHandle(
Function::New(function_name, RawFunction::kRegularFunction,

Powered by Google App Engine
This is Rietveld 408576698