Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
7b69d137
Commit
7b69d137
authored
Jan 03, 2020
by
Dan Field
Committed by
Flutter GitHub Bot
Jan 03, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reset state between runs of devFS tests (#48101)
parent
d7c347f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
devfs_test.dart
packages/flutter_tools/test/general.shard/devfs_test.dart
+13
-7
No files found.
packages/flutter_tools/test/general.shard/devfs_test.dart
View file @
7b69d137
...
...
@@ -26,7 +26,6 @@ void main() {
String
filePath
;
Directory
tempDir
;
String
basePath
;
DevFS
devFS
;
setUpAll
(()
{
fs
=
MemoryFileSystem
();
...
...
@@ -142,7 +141,7 @@ void main() {
return
Future
<
HttpClientResponse
>.
value
(
httpClientResponse
);
});
devFS
=
DevFS
(
vmService
,
'test'
,
tempDir
);
final
DevFS
devFS
=
DevFS
(
vmService
,
'test'
,
tempDir
);
await
devFS
.
create
();
final
MockResidentCompiler
residentCompiler
=
MockResidentCompiler
();
...
...
@@ -168,6 +167,7 @@ void main() {
group
(
'devfs remote'
,
()
{
MockVMService
vmService
;
final
MockResidentCompiler
residentCompiler
=
MockResidentCompiler
();
DevFS
devFS
;
setUpAll
(()
async
{
tempDir
=
_newTempDir
(
fs
);
...
...
@@ -176,6 +176,11 @@ void main() {
await
vmService
.
setUp
();
});
setUp
(()
{
vmService
.
resetState
();
devFS
=
DevFS
(
vmService
,
'test'
,
tempDir
);
});
tearDownAll
(()
async
{
await
vmService
.
tearDown
();
_cleanupTempDirs
();
...
...
@@ -190,7 +195,6 @@ void main() {
// simulate package
await
_createPackage
(
fs
,
'somepkg'
,
'somefile.txt'
);
devFS
=
DevFS
(
vmService
,
'test'
,
tempDir
);
await
devFS
.
create
();
vmService
.
expectMessages
(<
String
>[
'create test'
]);
expect
(
devFS
.
assetPathsToEvict
,
isEmpty
);
...
...
@@ -232,8 +236,6 @@ void main() {
// simulate package
await
_createPackage
(
fs
,
'somepkg'
,
'somefile.txt'
);
devFS
=
DevFS
(
vmService
,
'test'
,
tempDir
);
await
devFS
.
create
();
vmService
.
expectMessages
(<
String
>[
'create test'
]);
expect
(
devFS
.
assetPathsToEvict
,
isEmpty
);
...
...
@@ -253,7 +255,6 @@ void main() {
});
testUsingContext
(
'reports unsuccessful compile when errors are returned'
,
()
async
{
devFS
=
DevFS
(
vmService
,
'test'
,
tempDir
);
await
devFS
.
create
();
final
DateTime
previousCompile
=
devFS
.
lastCompiled
;
...
...
@@ -283,7 +284,6 @@ void main() {
});
testUsingContext
(
'correctly updates last compiled time when compilation does not fail'
,
()
async
{
devFS
=
DevFS
(
vmService
,
'test'
,
tempDir
);
// simulate package
final
File
sourceFile
=
await
_createPackage
(
fs
,
'somepkg'
,
'main.dart'
);
...
...
@@ -359,8 +359,14 @@ class MockVMService extends BasicMock implements VMService {
await
_server
?.
close
();
}
void
resetState
()
{
_vm
=
MockVM
(
this
);
messages
.
clear
();
}
@override
dynamic
noSuchMethod
(
Invocation
invocation
)
=>
super
.
noSuchMethod
(
invocation
);
}
class
MockVM
implements
VM
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment