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

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

Issue 2680303002: Kernel debugging; service tests (Closed)
Patch Set: Address comments 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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'test_helper.dart';
6 import 'service_test_common.dart';
7
8 const int LINE_A = 12;
9 const String file = "next_through_is_and_as_test.dart";
10
11 code() {
12 var i = 42.42;
13 var hex = 0x42;
14 if (i is int) {
15 print("i is int");
16 int x = i as int;
17 if (x.isEven) {
18 print("it's even even!");
19 } else {
20 print("but it's not even even!");
21 }
22 }
23 if (i is! int) {
24 print("i is not int");
25 }
26 if (hex is int) {
27 print("hex is int");
28 int x = hex as int;
29 if (x.isEven) {
30 print("it's even even!");
31 } else {
32 print("but it's not even even!");
33 }
34 }
35 if (hex is! int) {
36 print("hex is not int");
37 }
38 }
39
40 List<String> stops = [];
41 List<String> expected = [
42 "$file:${LINE_A+0}:9", // on '='
43 "$file:${LINE_A+1}:11", // on '"'
44 "$file:${LINE_A+2}:9", // on 'is'
45 "$file:${LINE_A+11}:9", // on 'is!'
46 "$file:${LINE_A+12}:5", // on call to 'print'
47 "$file:${LINE_A+14}:11", // in 'is'
48 "$file:${LINE_A+15}:5", // on call to 'print'
49 "$file:${LINE_A+16}:17", // on 'as'
50 "$file:${LINE_A+17}:11", // on 'isEven'
51 "$file:${LINE_A+18}:7", // on call to 'print'
52 "$file:${LINE_A+23}:11", // on 'is!'
53 "$file:${LINE_A+26}:1" // on ending '}'
54 ];
55
56 var tests = [
57 hasPausedAtStart,
58 setBreakpointAtLine(LINE_A),
59 runStepThroughProgramRecordingStops(stops),
60 checkRecordedStops(stops, expected)
61 ];
62
63 main(args) {
64 runIsolateTestsSynchronous(args, tests,
65 testeeConcurrent: code, pause_on_start: true, pause_on_exit: true);
66 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698