blob: 94be7555c4aa68d958e331a09d60e6a26f50b198 [file] [log] [blame]
// Copyright (c) 2020, 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.
// Verify deferred library status is per-isolate, not per-isolate-group.
// VMOptions=--enable-isolate-groups
import 'dart:async';
import 'dart:isolate';
import 'package:expect/expect.dart';
import "splay_test.dart" deferred as splay;
worker(SendPort sendPort) {
Expect.throws(() => splay.main(),
(e) => e.toString() == "Deferred library splay was not loaded.");
main() async {
await splay.loadLibrary();
final receivePort = ReceivePort();
Isolate.spawn(worker, receivePort.sendPort);
Expect.isTrue(await receivePort.first);