Skip to content

Commit

Permalink
Update tests, update CHANGELOG.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mkustermann committed Oct 7, 2024
1 parent dec8944 commit f056c8f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
7 changes: 7 additions & 0 deletions pkgs/native_assets_builder/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
- **Breaking change**: Remove asset-type specific logic from `package:native_assets_builder`.
Bundling tools have to now supply `supportedAssetTypes` and corresponding
validation routines.
- **Breaking change**: The `NativeAssetsBuildRunner.link()` command will now
produce a `LinkResult` containing all assets for the application (not just
those that happened to have a linker). This removes the need for a bundling
tool to combine parts of `BuildResult` and `LinkResult` and possibly checking
consistency of the sum of those parts. Effectively this means: Any asset that
doesn't have an explicit linker will get a NOP linker that emits as outputs
it's inputs.

## 0.8.3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,8 @@ void main() async {
linkValidator: validateCodeAssetLinkOutput,
applicationAssetValidator: validateCodeAssetsInApplication,
);
expect(linkResult.success, isTrue);

final allAssets = [
...buildResult.encodedAssets,
...linkResult.encodedAssets
].where((e) => e.type == CodeAsset.type).toList();
final validateResult = await validateCodeAssetsInApplication(allAssets);
expect(validateResult, isNotEmpty);
// Application validation error due to conflicting dylib name.
expect(linkResult.success, isFalse);
});
});
}
4 changes: 2 additions & 2 deletions pkgs/native_assets_builder/test/build_runner/link_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ void main() async {
);
expect(linkResult.success, true);

expect(
_getNames(linkResult.encodedAssets), unorderedEquals(linkedAssets));
expect(_getNames(linkResult.encodedAssets),
unorderedEquals([...builtHelperAssets, ...linkedAssets]));
});
},
);
Expand Down

0 comments on commit f056c8f

Please sign in to comment.