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

Unified Diff: runtime/vm/unit_test.h

Issue 9316071: Dart_PropagateError, take 2. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 11 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/stack_frame.cc ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/unit_test.h
===================================================================
--- runtime/vm/unit_test.h (revision 3862)
+++ runtime/vm/unit_test.h (working copy)
@@ -78,9 +78,12 @@
static void CodeGenTestRun##name(const Function& function) { \
GrowableArray<const Object*> arguments; \
const Array& kNoArgumentNames = Array::Handle(); \
- Instance& result = Instance::Handle(); \
+ Object& result = Object::Handle(); \
result = DartEntry::InvokeStatic(function, arguments, kNoArgumentNames); \
- EXPECT(result.Equals(Instance::Handle(expected))); \
+ EXPECT(!result.IsError()); \
+ Instance& actual = Instance::Handle(); \
+ actual ^= result.raw(); \
+ EXPECT(actual.Equals(Instance::Handle(expected))); \
}
@@ -115,9 +118,12 @@
static void CodeGenTestRun##name1(const Function& function) { \
GrowableArray<const Object*> arguments; \
const Array& kNoArgumentNames = Array::Handle(); \
- Instance& result = Instance::Handle(); \
+ Object& result = Object::Handle(); \
result = DartEntry::InvokeStatic(function, arguments, kNoArgumentNames); \
- EXPECT(result.Equals(Instance::Handle(expected))); \
+ EXPECT(!result.IsError()); \
+ Instance& actual = Instance::Handle(); \
+ actual ^= result.raw(); \
+ EXPECT(actual.Equals(Instance::Handle(expected))); \
}
« no previous file with comments | « runtime/vm/stack_frame.cc ('k') | runtime/vm/unit_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698