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

Unified Diff: runtime/observatory/tests/service/breakpoint_two_args_checked_test.dart

Issue 2194493002: DBC: Fix not-stopping/crashing at fast Smi op breakpoints. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: year Created 4 years, 5 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 | « no previous file | runtime/observatory/tests/service/service.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/tests/service/breakpoint_two_args_checked_test.dart
diff --git a/runtime/observatory/tests/service/breakpoint_two_args_checked_test.dart b/runtime/observatory/tests/service/breakpoint_two_args_checked_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..610af92dc491d767ad89fbb61c90e7800d48803a
--- /dev/null
+++ b/runtime/observatory/tests/service/breakpoint_two_args_checked_test.dart
@@ -0,0 +1,72 @@
+// Copyright (c) 2016, 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.
+// VMOptions=--error_on_bad_type --error_on_bad_override --verbose_debug
+
+// This test is mostly interesting for DBC, which needs to patch two bytecodes
+// to create a breakpoint for fast Smi ops.
+
+import 'package:observatory/service_io.dart';
+import 'package:unittest/unittest.dart';
+import 'service_test_common.dart';
+import 'test_helper.dart';
+import 'dart:developer';
+
+const int LINE_A = 26;
+const int LINE_B = 27;
+const int LINE_C = 28;
+
+class NotGeneric { }
+
+testeeMain() {
+ var x = new List(1);
+ var y = 7;
+ debugger();
+ print("Statement");
+ x[0] = 3; // Line A.
+ x is NotGeneric; // Line B.
+ y & 4; // Line C.
+}
+
+var tests = [
+
+hasStoppedAtBreakpoint,
+
+// Add breakpoints.
+(Isolate isolate) async {
+ var rootLib = await isolate.rootLibrary.load();
+ var script = rootLib.scripts[0];
+
+ var bpt1 = await isolate.addBreakpoint(script, LINE_A);
+ print(bpt1);
+ expect(bpt1.resolved, isTrue);
+ expect(await bpt1.location.getLine(), equals(LINE_A));
+
+ var bpt2 = await isolate.addBreakpoint(script, LINE_B);
+ print(bpt2);
+ expect(bpt2.resolved, isTrue);
+ expect(await bpt2.location.getLine(), equals(LINE_B));
+
+ var bpt3 = await isolate.addBreakpoint(script, LINE_C);
+ print(bpt3);
+ expect(bpt3.resolved, isTrue);
+ expect(await bpt3.location.getLine(), equals(LINE_C));
+},
+
+resumeIsolate,
+
+hasStoppedAtBreakpoint,
+stoppedAtLine(LINE_A),
+resumeIsolate,
+
+hasStoppedAtBreakpoint,
+stoppedAtLine(LINE_B),
+resumeIsolate,
+
+hasStoppedAtBreakpoint,
+stoppedAtLine(LINE_C),
+resumeIsolate,
+
+];
+
+main(args) => runIsolateTests(args, tests, testeeConcurrent: testeeMain);
« no previous file with comments | « no previous file | runtime/observatory/tests/service/service.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698