[flutter_tools] fix test asset loading (#103667)

This commit is contained in:
Jonah Williams
2022-05-14 10:59:07 -07:00
committed by GitHub
parent d3b80f884f
commit 90a592bf36
9 changed files with 28 additions and 20 deletions

View File

@@ -754,7 +754,7 @@ class FakeFlutterTestRunner implements FlutterTestRunner {
bool updateGoldens = false,
TestWatcher watcher,
int concurrency,
bool buildTestAssets = false,
String testAssetDirectory,
FlutterProject flutterProject,
String icudtlPath,
Directory coverageDirectory,

View File

@@ -95,7 +95,7 @@ void main() {
precompiledDillPath: 'def',
precompiledDillFiles: expectedPrecompiledDillFiles,
updateGoldens: true,
buildTestAssets: true,
testAssetDirectory: '/build/test',
serverType: InternetAddressType.IPv6,
icudtlPath: 'ghi',
platformPluginRegistration: (FlutterPlatform platform) {
@@ -114,7 +114,7 @@ void main() {
expect(flutterPlatform.precompiledDillPath, equals('def'));
expect(flutterPlatform.precompiledDillFiles, expectedPrecompiledDillFiles);
expect(flutterPlatform.updateGoldens, equals(true));
expect(flutterPlatform.buildTestAssets, equals(true));
expect(flutterPlatform.testAssetDirectory, '/build/test');
expect(flutterPlatform.icudtlPath, equals('ghi'));
});
});

View File

@@ -87,6 +87,7 @@ void main() {
'--enable-dart-profiling',
'--non-interactive',
'--use-test-fonts',
'--disable-asset-fonts',
'--packages=.dart_tool/package_config.json',
'example.dill',
], environment: <String, String>{
@@ -131,6 +132,7 @@ void main() {
'--enable-dart-profiling',
'--non-interactive',
'--use-test-fonts',
'--disable-asset-fonts',
'--packages=.dart_tool/package_config.json',
'example.dill',
], environment: <String, String>{
@@ -203,6 +205,7 @@ void main() {
'--enable-dart-profiling',
'--non-interactive',
'--use-test-fonts',
'--disable-asset-fonts',
'--packages=.dart_tool/package_config.json',
'--foo',
'--bar',
@@ -244,6 +247,7 @@ void main() {
'--enable-dart-profiling',
'--non-interactive',
'--use-test-fonts',
'--disable-asset-fonts',
'--packages=.dart_tool/package_config.json',
'example.dill',
],
@@ -293,7 +297,7 @@ class TestFlutterTesterDevice extends FlutterTesterTestDevice {
enableObservatory: enableObservatory,
machine: false,
host: InternetAddress.loopbackIPv6,
buildTestAssets: false,
testAssetDirectory: null,
flutterProject: null,
icudtlPath: null,
compileExpression: null,