Download and handle product version of flutter patched sdk (#31063)

* Support release/debug flavors of flutter_patched_sdk

* Use [anyNamed] instead of [any] for mocking named arguments

* Fix use of local engine in release mode
This commit is contained in:
Alexander Aprelev
2019-04-15 21:02:20 -07:00
committed by GitHub
parent 4ef0292790
commit d775908c7e
15 changed files with 72 additions and 47 deletions

View File

@@ -114,7 +114,8 @@ void main() {
mockXcode = MockXcode();
bufferLogger = BufferLogger();
for (BuildMode mode in BuildMode.values) {
when(mockArtifacts.getArtifactPath(Artifact.snapshotDart, any, mode)).thenReturn(kSnapshotDart);
when(mockArtifacts.getArtifactPath(Artifact.snapshotDart,
platform: anyNamed('platform'), mode: mode)).thenReturn(kSnapshotDart);
}
});
@@ -552,9 +553,11 @@ void main() {
mockArtifacts = MockArtifacts();
for (BuildMode mode in BuildMode.values) {
when(mockArtifacts.getArtifactPath(Artifact.vmSnapshotData, null, mode))
when(mockArtifacts.getArtifactPath(Artifact.vmSnapshotData,
platform: anyNamed('platform'), mode: mode))
.thenReturn(kEngineVmSnapshotData);
when(mockArtifacts.getArtifactPath(Artifact.isolateSnapshotData, null, mode))
when(mockArtifacts.getArtifactPath(Artifact.isolateSnapshotData,
platform: anyNamed('platform'), mode: mode))
.thenReturn(kEngineIsolateSnapshotData);
}
});