024052f367
We now have support for a test as a directory instead. Change-Id: I3c43e2e57ecda8e3c9d97aa8842be7093c1df5ab Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113035 Reviewed-by: Jens Johansen <jensj@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
25 lines
618 B
Dart
25 lines
618 B
Dart
// Copyright (c) 2013, 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.
|
|
|
|
// Test that loading of a library (with top-level functions only) can
|
|
// be deferred.
|
|
|
|
import 'lib.dart' deferred as lib;
|
|
|
|
/*member: readFoo:
|
|
OutputUnit(main, {}),
|
|
constants=[FunctionConstant(foo)=OutputUnit(1, {lib})]
|
|
*/
|
|
readFoo() {
|
|
return lib.foo;
|
|
}
|
|
|
|
/*member: main:OutputUnit(main, {})*/
|
|
main() {
|
|
lib.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
|
|
lib.foo('b');
|
|
readFoo();
|
|
});
|
|
}
|