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

Unified Diff: runtime/observatory/tests/service/async_next_test.dart

Issue 2930993004: Address additional analysis issues in the observatory codebase. (Closed)
Patch Set: Created 3 years, 6 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/async_next_test.dart
diff --git a/runtime/observatory/tests/service/async_next_test.dart b/runtime/observatory/tests/service/async_next_test.dart
index d656f7792c67492ac1759b7eb522e14daf3103e7..2f97370142a3af6cecedc4f6bd7a3b91ffbf9fb8 100644
--- a/runtime/observatory/tests/service/async_next_test.dart
+++ b/runtime/observatory/tests/service/async_next_test.dart
@@ -3,22 +3,19 @@
// BSD-style license that can be found in the LICENSE file.
// VMOptions=--error_on_bad_type --error_on_bad_override --verbose_debug
-import 'package:observatory/service_io.dart';
-import 'service_test_common.dart';
-import 'test_helper.dart';
import 'dart:developer';
+import 'dart:io';
-const int LINE_A = 19;
-const int LINE_B = 20;
-const int LINE_C = 21;
+import 'service_test_common.dart';
+import 'test_helper.dart';
foo() async {}
doAsync(stop) async {
if (stop) debugger();
- await foo(); // Line A.
- await foo(); // Line B.
- await foo(); // Line C.
+ await foo(); // LINE_A.
+ await foo(); // LINE_B.
+ await foo(); // LINE_C.
return null;
}
@@ -29,17 +26,19 @@ testMain() {
doAsync(true);
}
+final ScriptLineParser lineParser = new ScriptLineParser(Platform.script);
+
var tests = [
hasStoppedAtBreakpoint,
- stoppedAtLine(LINE_A),
+ stoppedAtLine(lineParser.lineFor('LINE_A')),
stepOver, // foo()
asyncNext,
hasStoppedAtBreakpoint,
- stoppedAtLine(LINE_B),
+ stoppedAtLine(lineParser.lineFor('LINE_B')),
stepOver, // foo()
asyncNext,
hasStoppedAtBreakpoint,
- stoppedAtLine(LINE_C),
+ stoppedAtLine(lineParser.lineFor('LINE_C')),
resumeIsolate,
];

Powered by Google App Engine
This is Rietveld 408576698