-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
pkgs/native_assets_builder/test/build_runner/package_layout_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// 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. | ||
|
||
import 'package:native_assets_builder/native_assets_builder.dart'; | ||
import 'package:test/test.dart'; | ||
|
||
import '../helpers.dart'; | ||
import 'helpers.dart'; | ||
|
||
void main() async { | ||
test('fromRootPackageRoot', () async { | ||
await inTempDir((tempUri) async { | ||
await copyTestProjects(targetUri: tempUri); | ||
final nativeAddUri = tempUri.resolve('native_add/'); | ||
|
||
// First, run `pub get`, we need pub to resolve our dependencies. | ||
await runPubGet(workingDirectory: nativeAddUri, logger: logger); | ||
|
||
final packageLayout = | ||
await PackageLayout.fromRootPackageRoot(nativeAddUri); | ||
final packageLayout2 = PackageLayout.fromPackageConfig( | ||
packageLayout.packageConfig, | ||
packageLayout.packageConfigUri, | ||
); | ||
expect(packageLayout.rootPackageRoot, packageLayout2.rootPackageRoot); | ||
}); | ||
}); | ||
} |