# Copyright (c) 2019, 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.md file. # Compile an application with a number of modules. # Try out "trickery" in the module dependencies to force needing more or less # dill libraries. type: newworld modules: moduleB: moduleB/b.dart: | import 'package:moduleC/c.dart'; export 'package:moduleC/c.dart' show baz; var mya2 = new A2(); class A2 extends A3 { int bar = 42; } moduleB/.packages: | moduleB:. moduleC:../moduleC moduleD:../moduleD moduleC: moduleC/c.dart: | import 'package:moduleD/d.dart'; String baz = "42"; String baz2 = baz3; class A3 { int foo = 42; } moduleC/.packages: | moduleC:. moduleD:../moduleD moduleD: moduleD/d.dart: | String baz3 = "baz3"; moduleD/.packages: | moduleD:. worlds: - entry: a.dart fromComponent: true sources: a.dart: | import "package:moduleB/b.dart"; String foo = baz; var x = mya2.bar; .packages: | moduleB:moduleB moduleC:moduleC moduleD:moduleD modules: - moduleB - moduleC - moduleD expectedLibraryCount: 4 neededDillLibraries: # 'd.dart' not needed. - package:moduleB/b.dart - package:moduleC/c.dart expectedContent: org-dartlang-test:///a.dart: - Field foo - Field x package:moduleB/b.dart: - Class A2 - Field mya2 package:moduleC/c.dart: - Class A3 - Field baz - Field baz2 package:moduleD/d.dart: - Field baz3