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

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

Issue 24203004: Dart VM: Simplify code generation for equality operators. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: fixed single stepping, added debugger test Created 7 years, 3 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
« runtime/vm/parser.cc ('K') | « runtime/vm/stub_code_x64.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/debugger/step_in_equals_test.dart
===================================================================
--- tests/standalone/debugger/step_in_equals_test.dart (revision 0)
+++ tests/standalone/debugger/step_in_equals_test.dart (revision 0)
@@ -0,0 +1,42 @@
+// Copyright (c) 2013, 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() {
+ if (RunScript(testScript)) return;
+ var a = new MyClass();
+ var b = null;
+ var x = a == b; // Breakpoint #1.
hausner 2013/09/25 16:36:11 I think the case of comparing to null explicitly i
Florian Schneider 2013/09/26 11:34:21 Done. Appended (x == null) and (null == x) to the
+ print(x);
+ b = 123;
+ a == b; // Breakpoint #2.
+ print("ok");
+}
+
+var testScript = [
+ MatchFrames(["main"]),
+ SetBreakpoint(18),
+ SetBreakpoint(21),
+ SetBreakpoint(10),
+ Resume(),
+ MatchFrames(["main"]), // At breakpoint #1.
+ StepInto(),
+ MatchFrames(["main"]), // Don't step into == method because of null.
+ Resume(),
+ MatchFrames(["main"]), // At breakpoint #2.
+ StepInto(),
+ StepInto(),
+ MatchFrames(["MyClass.==", "main"]), // At MyClass.== entry.
+ Resume(),
+ MatchFrames(["MyClass.==", "main"]), // At breakpoint #3.
+ Resume()
+];
« runtime/vm/parser.cc ('K') | « runtime/vm/stub_code_x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698