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

Side by Side Diff: runtime/observatory/tests/service/breakpoint_two_args_checked_test.dart

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

Powered by Google App Engine
This is Rietveld 408576698