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

Unified Diff: runtime/observatory/test/async_generator_breakpoint_test.dart

Issue 1071363002: Relocate service library tests and hookup a working status file (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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/test/async_generator_breakpoint_test.dart
diff --git a/runtime/observatory/test/async_generator_breakpoint_test.dart b/runtime/observatory/test/async_generator_breakpoint_test.dart
deleted file mode 100644
index 91141fac10ccb17f4dd94e1d5756ff56945b946c..0000000000000000000000000000000000000000
--- a/runtime/observatory/test/async_generator_breakpoint_test.dart
+++ /dev/null
@@ -1,88 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// VMOptions=--compile-all --error_on_bad_type --error_on_bad_override --checked --verbose-debug
-
-import 'package:observatory/service_io.dart';
-import 'package:unittest/unittest.dart';
-import 'test_helper.dart';
-
-printSync() { // Line 10
- print('sync');
-}
-printAsync() async { // Line 13
- print('async');
-}
-printAsyncStar() async* { // Line 16
- print('async*');
-}
-printSyncStar() sync* { // Line 19
- print('sync*');
-}
-
-var testerReady = false;
-testeeDo() {
- // We block here rather than allowing the isolate to enter the
- // paused-on-exit state before the tester gets a chance to set
- // the breakpoints because we need the event loop to remain
- // operational for the async bodies to run.
- print('testee waiting');
- while(!testerReady);
-
- printSync();
- var future = printAsync();
- var stream = printAsyncStar();
- var iterator = printSyncStar();
-
- print('middle'); // Line 37.
-
- future.then((v) => print(v));
- stream.toList();
- iterator.toList();
-}
-
-testAsync(Isolate isolate) async {
- await isolate.rootLib.load();
- var script = isolate.rootLib.scripts[0];
-
- var bp1 = await isolate.addBreakpoint(script, 10);
- expect(bp1, isNotNull);
- expect(bp1 is Breakpoint, isTrue);
- var bp2 = await isolate.addBreakpoint(script, 13);
- expect(bp2, isNotNull);
- expect(bp2 is Breakpoint, isTrue);
- var bp3 = await isolate.addBreakpoint(script, 16);
- expect(bp3, isNotNull);
- expect(bp3 is Breakpoint, isTrue);
- var bp4 = await isolate.addBreakpoint(script, 19);
- expect(bp4, isNotNull);
- expect(bp4 is Breakpoint, isTrue);
- var bp5 = await isolate.addBreakpoint(script, 37);
- print("BP5 - $bp5");
- expect(bp5, isNotNull);
- expect(bp5 is Breakpoint, isTrue);
-
- var hits = [];
-
- isolate.eval(isolate.rootLib, 'testerReady = true;')
- .then((Instance result) {
- expect(result.valueAsString, equals('true'));
- });
-
- await for (ServiceEvent event in isolate.vm.events.stream) {
- if (event.eventType == ServiceEvent.kPauseBreakpoint) {
- var bp = event.breakpoint;
- print('Hit $bp');
- hits.add(bp);
- isolate.resume();
-
- if (hits.length == 5) break;
- }
- }
-
- expect(hits, equals([bp1, bp5, bp4, bp2, bp3]));
-}
-
-var tests = [testAsync];
-
-main(args) => runIsolateTests(args, tests, testeeConcurrent: testeeDo);
« no previous file with comments | « runtime/observatory/test/allocations_test.dart ('k') | runtime/observatory/test/bad_web_socket_address_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698