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

Unified Diff: runtime/vm/resolver_test.cc

Issue 19662003: Refactor resolution code in the vm to properly handle ambiguity errors. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/resolver.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/resolver_test.cc
===================================================================
--- runtime/vm/resolver_test.cc (revision 25321)
+++ runtime/vm/resolver_test.cc (working copy)
@@ -92,6 +92,7 @@
const String& class_name = String::Handle(String::New(test_class_name));
const String& static_function_name =
String::Handle(String::New(test_static_function_name));
+ String& ambiguity_error_msg = String::Handle();
// Now try to resolve and invoke the static function in this class.
{
@@ -102,8 +103,9 @@
static_function_name,
kNumArguments,
Object::empty_array(),
- kResolveType));
- EXPECT(!function.IsNull());
+ kResolveType,
+ &ambiguity_error_msg));
+ EXPECT(!function.IsNull()); // No ambiguity error expected.
const Array& args = Array::Handle(Array::New(kNumArguments));
const String& arg0 = String::Handle(String::New("junk"));
args.SetAt(0, arg0);
@@ -123,8 +125,9 @@
static_function_name,
kNumArguments,
Object::empty_array(),
- kResolveType));
- EXPECT(bad_function.IsNull());
+ kResolveType,
+ &ambiguity_error_msg));
+ EXPECT(bad_function.IsNull()); // No ambiguity error expected.
}
// Hierarchy walking.
@@ -139,8 +142,9 @@
super_static_function_name,
kNumArguments,
Object::empty_array(),
- kResolveType));
- EXPECT(!super_function.IsNull());
+ kResolveType,
+ &ambiguity_error_msg));
+ EXPECT(!super_function.IsNull()); // No ambiguity error expected.
}
}
@@ -161,9 +165,10 @@
const String& lib_name = String::Handle(String::New(test_library_name));
const Library& lib = Library::Handle(Library::LookupLibrary(lib_name));
ASSERT(!lib.IsNull());
+ String& ambiguity_error_msg = String::Handle();
const Class& cls = Class::Handle(lib.LookupClass(
- String::Handle(Symbols::New(test_class_name))));
- EXPECT(!cls.IsNull());
+ String::Handle(Symbols::New(test_class_name)), &ambiguity_error_msg));
+ EXPECT(!cls.IsNull()); // No ambiguity error expected.
Instance& receiver = Instance::Handle(Instance::New(cls));
const String& function_name = String::Handle(String::New(test_function_name));
« no previous file with comments | « runtime/vm/resolver.cc ('k') | runtime/vm/snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698