dart-sdk/tests/standalone/regress_45347.dart
asiva 8e6a02d899 [vm/lib] Fix for https://github.com/dart-lang/sdk/issues/45347
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>
2023-10-11 21:51:02 +00:00

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);
}
}