| Index: runtime/observatory/tests/service/debugger_inspect_test.dart
|
| diff --git a/runtime/observatory/tests/service/debugger_inspect_test.dart b/runtime/observatory/tests/service/debugger_inspect_test.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..534595c0cbedaa22006dba539ad0a5710b4776bd
|
| --- /dev/null
|
| +++ b/runtime/observatory/tests/service/debugger_inspect_test.dart
|
| @@ -0,0 +1,43 @@
|
| +// 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
|
| +
|
| +import 'package:observatory/service_io.dart';
|
| +import 'package:unittest/unittest.dart';
|
| +import 'test_helper.dart';
|
| +import 'dart:async';
|
| +import 'dart:developer';
|
| +
|
| +class Point {
|
| + int x, y;
|
| + Point(this.x, this.y);
|
| +}
|
| +
|
| +void testeeDo() {
|
| + Debugger.inspect(new Point(3, 4));
|
| +}
|
| +
|
| +var tests = [
|
| +
|
| +(Isolate isolate) async {
|
| + Completer completer = new Completer();
|
| + var subscription;
|
| + subscription = isolate.vm.events.stream.listen((ServiceEvent event) {
|
| + print(event);
|
| + if (event.eventType == ServiceEvent.kInspect) {
|
| + expect((event.inspectee as Instance).clazz.name, equals('Point'));
|
| +
|
| + subscription.cancel();
|
| + completer.complete();
|
| + }
|
| + });
|
| +
|
| + // Start listening for events first.
|
| + await isolate.eval(isolate.rootLib, 'testeeDo();');
|
| + return completer.future;
|
| +},
|
| +
|
| +];
|
| +
|
| +main(args) => runIsolateTests(args, tests);
|
|
|