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

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

Issue 135843003: Fix several little buglets with stepping (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
Index: tests/standalone/debugger/break_at_equals_test.dart
===================================================================
--- tests/standalone/debugger/break_at_equals_test.dart (revision 0)
+++ tests/standalone/debugger/break_at_equals_test.dart (working copy)
@@ -0,0 +1,52 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "debug_lib.dart";
+
+class MyClass {
+ operator ==(other) {
+ print(other);
+ return true; // Breakpoint #3.
+ }
+}
+
+main(List<String> arguments) {
+ if (RunScript(testScript, arguments)) return;
+ var a = new MyClass();
+ var b = null;
+ a == b; // Breakpoint #1.
+ print("after 1");
+ b = 123;
+ a == b; // Breakpoint #2.
+ print("after 2");
+ a == null; // Breakpoint #4.
+ print("after 4");
+ if (null == a) {
+ throw "unreachable";
+ }
+ print("ok");
+}
+
+// Checks that debugger can stop at calls to == even if one
+// of the operands is null.
+
+var testScript = [
+ MatchFrames(["main"]),
+ MatchLine(15),
+ SetBreakpoint(18),
+ SetBreakpoint(21),
+ SetBreakpoint(10),
+ SetBreakpoint(23),
+ Resume(),
+ MatchFrames(["main"]),
+ MatchLine(18), // At breakpoint #1.
+ Resume(),
+ MatchLine(21), // At breakpoint #2; didn't hit breakpoint in MyClass.==.
+ Resume(),
+ MatchFrames(["MyClass.==", "main"]),
+ MatchLine(10), // At breakpoint #3 in MyClass.==.
+ Resume(),
+ MatchLine(23), // At breakpoint #4.
+ Resume()
Florian Schneider 2014/01/17 10:18:01 Why doesn't this new test does test single steppin
+];

Powered by Google App Engine
This is Rietveld 408576698