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

Unified Diff: tests/standalone/debugger/debug_lib.dart

Issue 102453002: VM debugger: fix closures in mixed-in functions (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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/object.cc ('k') | tests/standalone/debugger/mixin_closure_debugger_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/debugger/debug_lib.dart
===================================================================
--- tests/standalone/debugger/debug_lib.dart (revision 30815)
+++ tests/standalone/debugger/debug_lib.dart (working copy)
@@ -184,8 +184,9 @@
class FrameMatcher extends Command {
int frameIndex;
List<String> functionNames;
+ bool exactMatch;
- FrameMatcher(this.frameIndex, this.functionNames) {
+ FrameMatcher(this.frameIndex, this.functionNames, this.exactMatch) {
template = {"id": 0, "command": "getStackTrace", "params": {"isolateId": 0}};
}
@@ -211,7 +212,9 @@
var idx = i + frameIndex;
var name = frames[idx]["functionName"];
assert(name != null);
- if (name != functionNames[i]) {
+ bool isMatch = exactMatch ? name == functionNames[i]
+ : name.contains(functionNames[i]);
+ if (!isMatch) {
debugger.error("Error: call frame $idx: "
"expected function name '${functionNames[i]}' but found '$name'");
return;
@@ -221,12 +224,12 @@
}
-MatchFrame(int frameIndex, String functionName) {
- return new FrameMatcher(frameIndex, [ functionName ]);
+MatchFrame(int frameIndex, String functionName, {exactMatch: false}) {
+ return new FrameMatcher(frameIndex, [functionName], exactMatch);
}
-MatchFrames(List<String> functionNames) {
- return new FrameMatcher(0, functionNames);
+MatchFrames(List<String> functionNames, {exactMatch: false}) {
+ return new FrameMatcher(0, functionNames, exactMatch);
}
« no previous file with comments | « runtime/vm/object.cc ('k') | tests/standalone/debugger/mixin_closure_debugger_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698