mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 03:17:55 +00:00
8e6a02d899
TEST=new tests added Change-Id: Ic604cc9576f092c1bf96f411ae1abdea6c78c384 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329784 Reviewed-by: Ben Konyi <bkonyi@google.com> Commit-Queue: Siva Annamalai <asiva@google.com>
30 lines
836 B
Dart
30 lines
836 B
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.
|
|
|
|
// Regression test for https://github.com/dart-lang/sdk/issues/45347
|
|
|
|
import 'dart:developer';
|
|
import 'dart:isolate';
|
|
import "package:expect/expect.dart";
|
|
|
|
void sendSetOfEnums(SendPort port) {
|
|
Isolate childIsolate = Isolate.current;
|
|
port.send(childIsolate);
|
|
}
|
|
|
|
void main() async {
|
|
try {
|
|
final id = Service.getIsolateId(Isolate.current) ?? "NA";
|
|
print(id);
|
|
|
|
final port = ReceivePort();
|
|
await Isolate.spawn(sendSetOfEnums, port.sendPort);
|
|
Isolate childIsolate = await port.first;
|
|
final did = childIsolate.debugName ?? "NA";
|
|
print(did);
|
|
} catch (e, s) {
|
|
Expect.isTrue(false);
|
|
}
|
|
}
|