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

Unified Diff: runtime/observatory/tests/service/smart_next_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 side-by-side diff with in-line comments
Download patch
Index: runtime/observatory/tests/service/smart_next_test.dart
diff --git a/runtime/observatory/tests/service/smart_next_test.dart b/runtime/observatory/tests/service/smart_next_test.dart
index 202866b3a4a4cd5c27c6dd95729dac916c85fc23..e0576a7e576bf4b6cf4b4c4351948a2c4b83934c 100644
--- a/runtime/observatory/tests/service/smart_next_test.dart
+++ b/runtime/observatory/tests/service/smart_next_test.dart
@@ -7,18 +7,21 @@ import 'package:observatory/service_io.dart';
import 'test_helper.dart';
import 'dart:async';
import 'dart:developer';
+import 'service_test_common.dart';
+
+const int LINE_A = 19;
foo() async { }
bar() { }
doAsync(stop) async {
if (stop) debugger();
- await foo(); // Line 16.
- bar(); // Line 17.
- bar(); // Line 18.
- await foo(); // Line 19.
- await foo(); // Line 20.
- bar(); // Line 21.
+ await foo(); // Line A.
+ bar(); // Line A + 1.
+ bar(); // Line A + 2.
+ await foo(); // Line A + 3.
+ await foo(); // Line A + 4.
+ bar(); // Line A + 5.
return null;
}
@@ -55,15 +58,15 @@ smartNext(Isolate isolate) async {
}
var tests = [
- hasStoppedAtBreakpoint, stoppedAtLine(16), // foo()
- smartNext, hasStoppedAtBreakpoint, stoppedAtLine(16), // await
- smartNext, hasStoppedAtBreakpoint, stoppedAtLine(17), // bar()
- smartNext, hasStoppedAtBreakpoint, stoppedAtLine(18), // bar()
- smartNext, hasStoppedAtBreakpoint, stoppedAtLine(19), // foo()
- smartNext, hasStoppedAtBreakpoint, stoppedAtLine(19), // await
- smartNext, hasStoppedAtBreakpoint, stoppedAtLine(20), // foo()
- smartNext, hasStoppedAtBreakpoint, stoppedAtLine(20), // await
- smartNext, hasStoppedAtBreakpoint, stoppedAtLine(21), // bar()
+ hasStoppedAtBreakpoint, stoppedAtLine(LINE_A), // foo()
+ smartNext, hasStoppedAtBreakpoint, stoppedAtLine(LINE_A), // await
+ smartNext, hasStoppedAtBreakpoint, stoppedAtLine(LINE_A + 1), // bar()
+ smartNext, hasStoppedAtBreakpoint, stoppedAtLine(LINE_A + 2), // bar()
+ smartNext, hasStoppedAtBreakpoint, stoppedAtLine(LINE_A + 3), // foo()
+ smartNext, hasStoppedAtBreakpoint, stoppedAtLine(LINE_A + 3), // await
+ smartNext, hasStoppedAtBreakpoint, stoppedAtLine(LINE_A + 4), // foo()
+ smartNext, hasStoppedAtBreakpoint, stoppedAtLine(LINE_A + 4), // await
+ smartNext, hasStoppedAtBreakpoint, stoppedAtLine(LINE_A + 5), // bar()
resumeIsolate,
];

Powered by Google App Engine
This is Rietveld 408576698