mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 08:20:31 +00:00
d81b48c6b1
TEST=CI Change-Id: I4e4871ac4df74cb4daca7ef42a66489b2afbdc64 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/270260 Reviewed-by: Ben Konyi <bkonyi@google.com> Commit-Queue: Derek Xu <derekx@google.com>
28 lines
1 KiB
Dart
28 lines
1 KiB
Dart
// Copyright (c) 2023, 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.
|
|
|
|
import 'package:test/test.dart';
|
|
import 'package:vm_service/vm_service.dart';
|
|
|
|
import 'common/test_helper.dart';
|
|
|
|
Future<Response> getImplementationFields(
|
|
VmService service, String isolateId, String objectId) async {
|
|
return await service.callMethod("_getImplementationFields",
|
|
isolateId: isolateId, args: {"objectId": objectId});
|
|
}
|
|
|
|
var tests = <IsolateTest>[
|
|
// A null object.
|
|
(VmService service, IsolateRef isolateRef) async {
|
|
final isolateId = isolateRef.id!;
|
|
final objectId = 'objects/null';
|
|
final result = await getImplementationFields(service, isolateId, objectId);
|
|
expect(result.json!["type"]!, "ImplementationFields");
|
|
expect(result.json!["fields"]!, isEmpty);
|
|
},
|
|
];
|
|
|
|
main([args = const <String>[]]) async =>
|
|
runIsolateTests(args, tests, 'get_implementation_fields_rpc_test.dart');
|