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

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

Issue 2767533002: Revert "Fix observatory tests broken by running dartfmt." (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) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, 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 4
5 import 'test_helper.dart'; 5 import 'test_helper.dart';
6 import 'service_test_common.dart'; 6 import 'service_test_common.dart';
7 7
8 const int LINE_A = 12; 8 const int LINE_A = 12;
9 const String file = "next_through_catch_test.dart"; 9 const String file = "next_through_catch_test.dart";
10 10
11 code() { 11 code() {
12 try { 12 try {
13 var value = "world"; 13 var value = "world";
14 throw "Hello, $value"; 14 throw "Hello, $value";
15 } catch (e, st) { 15 } catch(e, st) {
16 print(e); 16 print(e);
17 print(st); 17 print(st);
18 } 18 }
19 try { 19 try {
20 throw "Hello, world"; 20 throw "Hello, world";
21 } catch (e, st) { 21 } catch(e, st) {
22 print(e); 22 print(e);
23 print(st); 23 print(st);
24 } 24 }
25 } 25 }
26 26
27 List<String> stops = []; 27 List<String> stops = [];
28 List<String> expected = [ 28 List<String> expected = [
29 "$file:${LINE_A+1}:15", // on '=' 29 "$file:${LINE_A+1}:15", // on '='
30 "$file:${LINE_A+2}:26", // after last '"' (i.e. before ';') 30 "$file:${LINE_A+2}:26", // after last '"' (i.e. before ';')
31 "$file:${LINE_A+4}:5", // on call to 'print' 31 "$file:${LINE_A+4}:5", // on call to 'print'
32 "$file:${LINE_A+5}:5", // on call to 'print' 32 "$file:${LINE_A+5}:5", // on call to 'print'
33 "$file:${LINE_A+8}:5", // on 'throw' 33 "$file:${LINE_A+8}:5", // on 'throw'
34 "$file:${LINE_A+10}:5", // on call to 'print' 34 "$file:${LINE_A+10}:5", // on call to 'print'
35 "$file:${LINE_A+11}:5", // on call to 'print' 35 "$file:${LINE_A+11}:5", // on call to 'print'
36 "$file:${LINE_A+13}:1" // on ending '}' 36 "$file:${LINE_A+13}:1" // on ending '}'
37 ]; 37 ];
38 38
39 var tests = [ 39 var tests = [
40 hasPausedAtStart, 40 hasPausedAtStart,
41 setBreakpointAtLine(LINE_A), 41 setBreakpointAtLine(LINE_A),
42 runStepThroughProgramRecordingStops(stops), 42 runStepThroughProgramRecordingStops(stops),
43 checkRecordedStops(stops, expected) 43 checkRecordedStops(stops, expected)
44 ]; 44 ];
45 45
46 main(args) { 46 main(args) {
47 runIsolateTestsSynchronous(args, tests, 47 runIsolateTestsSynchronous(args, tests,
48 testeeConcurrent: code, pause_on_start: true, pause_on_exit: true); 48 testeeConcurrent: code, pause_on_start: true, pause_on_exit: true);
49 } 49 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698