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

Unified Diff: dart/pkg/unittest/lib/mock.dart

Issue 14066019: Change memberName and namedArguments in Invocation to use Symbol. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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: dart/pkg/unittest/lib/mock.dart
diff --git a/dart/pkg/unittest/lib/mock.dart b/dart/pkg/unittest/lib/mock.dart
index 8bdb115ce348308cb4fa449f3767149b8827056b..9ee6d8a80ce0479a40c6fc4258538304a9822e53 100644
--- a/dart/pkg/unittest/lib/mock.dart
+++ b/dart/pkg/unittest/lib/mock.dart
@@ -90,6 +90,9 @@
*/
library mock;
+
+import 'dart:mirrors' show MirrorSystem;
+
import 'matcher.dart';
/**
@@ -1293,7 +1296,7 @@ class Mock {
* thrown.
*/
noSuchMethod(Invocation invocation) {
- var method = invocation.memberName;
+ var method = MirrorSystem.getName(invocation.memberName);
var args = invocation.positionalArguments;
if (invocation.isGetter) {
method = 'get $method';

Powered by Google App Engine
This is Rietveld 408576698