Files
sdk/runtime/observatory/tests/service/get_vm_rpc_test.dart
T
Ryan Macnak b258585f2f [observatory] Migrate from deprecated isInstanceOf to isA.
Change-Id: Ie68ebbb1ed46b8000fe6c6110774cd031c20aeaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155280
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-07-22 22:31:59 +00:00

33 lines
1.2 KiB
Dart

// 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=--vm-name=Walter
import 'dart:io';
import 'package:observatory/service_io.dart';
import 'package:test/test.dart';
import 'test_helper.dart';
var tests = <VMTest>[
(VM vm) async {
var result = await vm.invokeRpcNoUpgrade('getVM', {});
expect(result['type'], equals('VM'));
expect(result['name'], equals('Walter'));
expect(result['architectureBits'], isPositive);
expect(result['targetCPU'], isA<String>());
expect(result['hostCPU'], isA<String>());
expect(result['operatingSystem'], Platform.operatingSystem);
expect(result['version'], isA<String>());
expect(result['pid'], isA<int>());
expect(result['startTime'], isPositive);
expect(result['isolates'].length, isPositive);
expect(result['isolates'][0]['type'], equals('@Isolate'));
expect(result['isolateGroups'].length, isPositive);
expect(result['isolateGroups'][0]['type'], equals('@IsolateGroup'));
},
];
main(args) async => runVMTests(args, tests);