Files
sdk/tests/web/deferred/empty_holders/empty_holders_test.dart
T
Joshua Litt 2ad8d3d23e [dart2js] Add test for empty holders in an output unit.
Change-Id: I364366c2a5e9ce5895dbc4096d17ad04374b69d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202310
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-06-04 17:55:17 +00:00

21 lines
643 B
Dart

// Copyright (c) 2021, 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 "lib1.dart" deferred as lib1;
import "lib2.dart" deferred as lib2;
import "package:expect/expect.dart";
// Compiling lib_shared will result in a single part file which only uses
// the static state holder.
void main() {
lib1.loadLibrary().then((_) {
lib1.update();
Expect.equals(lib1.value(), 'lib1');
});
lib2.loadLibrary().then((_) {
lib2.update();
Expect.equals(lib2.value(), 'lib2');
});
}