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

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

Issue 2752753002: Additional service tests (Closed)
Patch Set: Formatted some tests 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 = 11;
9 const String file = "step_through_arithmetic_test.dart";
10
11 code() {
12 print(1 + 2);
13 print((1 + 2) / 2);
14 print(1 + 2 * 3);
15 print((1 + 2) * 3);
16 }
17
18 List<String> stops = [];
19 List<String> expected = [
20 "$file:${LINE+0}:5", // after 'code'
21
22 "$file:${LINE+1}:11", // on '+'
23 "$file:${LINE+1}:3", // on 'print'
24
25 "$file:${LINE+2}:12", // on '+'
26 "$file:${LINE+2}:17", // on '/'
27 "$file:${LINE+2}:3", // on 'print'
28
29 "$file:${LINE+3}:15", // on '*'
30 "$file:${LINE+3}:11", // on '+'
31 "$file:${LINE+3}:3", // on 'print'
32
33 "$file:${LINE+4}:12", // on '+'
34 "$file:${LINE+4}:17", // on '*'
35 "$file:${LINE+4}:3", // on 'print'
36
37 "$file:${LINE+5}:1" // on ending '}'
38 ];
39
40 var tests = [
41 hasPausedAtStart,
42 setBreakpointAtLine(LINE),
43 runStepIntoThroughProgramRecordingStops(stops),
44 checkRecordedStops(stops, expected,
45 debugPrint: true, debugPrintFile: file, debugPrintLine: LINE)
46 ];
47
48 main(args) {
49 runIsolateTestsSynchronous(args, tests,
50 testeeConcurrent: code, pause_on_start: true, pause_on_exit: true);
51 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698