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

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

Issue 1726773002: Refactor service tests in preparation of running on sky_shell (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 import 'package:observatory/service_io.dart'; 6 import 'package:observatory/service_io.dart';
7 import 'package:unittest/unittest.dart'; 7 import 'package:unittest/unittest.dart';
8 import 'service_test_common.dart';
8 import 'test_helper.dart'; 9 import 'test_helper.dart';
9 import 'dart:developer'; 10 import 'dart:developer';
10 11
11 testFunction(flag) { // Line 11 12 const int LINE_A = 14;
13
14 testFunction(flag) { // Line A.
12 if (flag) { 15 if (flag) {
13 print("Yes"); 16 print("Yes");
14 } else { 17 } else {
15 print("No"); 18 print("No");
16 } 19 }
17 } 20 }
18 21
19 testMain() { 22 testMain() {
20 debugger(); 23 debugger();
21 testFunction(true); 24 testFunction(true);
(...skipping 11 matching lines...) Expand all
33 var function = rootLib.functions.singleWhere((f) => f.name == 'testFunction'); 36 var function = rootLib.functions.singleWhere((f) => f.name == 'testFunction');
34 37
35 var bpt = await isolate.addBreakpointAtEntry(function); 38 var bpt = await isolate.addBreakpointAtEntry(function);
36 expect(bpt is Breakpoint, isTrue); 39 expect(bpt is Breakpoint, isTrue);
37 print(bpt); 40 print(bpt);
38 }, 41 },
39 42
40 resumeIsolate, 43 resumeIsolate,
41 44
42 hasStoppedAtBreakpoint, 45 hasStoppedAtBreakpoint,
43 stoppedAtLine(11), 46 stoppedAtLine(LINE_A),
44 resumeIsolate, 47 resumeIsolate,
45 48
46 hasStoppedAtBreakpoint, 49 hasStoppedAtBreakpoint,
47 stoppedAtLine(11), 50 stoppedAtLine(LINE_A),
48 resumeIsolate, 51 resumeIsolate,
49 52
50 ]; 53 ];
51 54
52 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain); 55 main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698