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

Side by Side 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, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/observatory/tests/service/service.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4 // VMOptions=--error_on_bad_type --error_on_bad_override --verbose_debug
5
6 // This test is mostly interesting for DBC, which needs to patch two bytecodes
7 // to create a breakpoint for fast Smi ops.
8
9 import 'package:observatory/service_io.dart';
10 import 'package:unittest/unittest.dart';
11 import 'service_test_common.dart';
12 import 'test_helper.dart';
13 import 'dart:developer';
14
15 const int LINE_A = 26;
16 const int LINE_B = 27;
17 const int LINE_C = 28;
18
19 class NotGeneric { }
20
21 testeeMain() {
22 var x = new List(1);
23 var y = 7;
24 debugger();
25 print("Statement");
26 x[0] = 3; // Line A.
27 x is NotGeneric; // Line B.
28 y & 4; // Line C.
29 }
30
31 var tests = [
32
33 hasStoppedAtBreakpoint,
34
35 // Add breakpoints.
36 (Isolate isolate) async {
37 var rootLib = await isolate.rootLibrary.load();
38 var script = rootLib.scripts[0];
39
40 var bpt1 = await isolate.addBreakpoint(script, LINE_A);
41 print(bpt1);
42 expect(bpt1.resolved, isTrue);
43 expect(await bpt1.location.getLine(), equals(LINE_A));
44
45 var bpt2 = await isolate.addBreakpoint(script, LINE_B);
46 print(bpt2);
47 expect(bpt2.resolved, isTrue);
48 expect(await bpt2.location.getLine(), equals(LINE_B));
49
50 var bpt3 = await isolate.addBreakpoint(script, LINE_C);
51 print(bpt3);
52 expect(bpt3.resolved, isTrue);
53 expect(await bpt3.location.getLine(), equals(LINE_C));
54 },
55
56 resumeIsolate,
57
58 hasStoppedAtBreakpoint,
59 stoppedAtLine(LINE_A),
60 resumeIsolate,
61
62 hasStoppedAtBreakpoint,
63 stoppedAtLine(LINE_B),
64 resumeIsolate,
65
66 hasStoppedAtBreakpoint,
67 stoppedAtLine(LINE_C),
68 resumeIsolate,
69
70 ];
71
72 main(args) => runIsolateTests(args, tests, testeeConcurrent: testeeMain);
OLDNEW
« 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