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
abba2ebc
Commit
abba2ebc
authored
Oct 27, 2016
by
Dan Rubel
Committed by
GitHub
Oct 27, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup test logger usage (#6560)
parent
311d371a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
10 deletions
+2
-10
android_device_test.dart
packages/flutter_tools/test/android_device_test.dart
+1
-5
create_test.dart
packages/flutter_tools/test/create_test.dart
+1
-5
No files found.
packages/flutter_tools/test/android_device_test.dart
View file @
abba2ebc
...
...
@@ -3,7 +3,6 @@
// found in the LICENSE file.
import
'package:flutter_tools/src/android/android_device.dart'
;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:test/test.dart'
;
import
'src/context.dart'
;
...
...
@@ -49,7 +48,6 @@ ZX1G22JJWR device usb:3-3 product:shamu model:Nexus_6 device:shamu f
expect
(
devices
.
first
.
name
,
'Nexus 6'
);
});
BufferLogger
logger
=
new
BufferLogger
();
testUsingContext
(
'adb error message'
,
()
{
List
<
AndroidDevice
>
devices
=
getAdbDevices
(
mockAdbOutput:
'''
It appears you do not have '
Android
SDK
Platform
-
tools
' installed.
...
...
@@ -57,9 +55,7 @@ Use the 'android' tool to install them:
android update sdk --no-ui --filter '
platform
-
tools
'
'''
);
expect
(
devices
,
hasLength
(
0
));
expect
(
logger
.
errorText
,
contains
(
'you do not have'
));
},
overrides:
<
Type
,
dynamic
>{
Logger
:
logger
,
expect
(
testLogger
.
errorText
,
contains
(
'you do not have'
));
});
});
...
...
packages/flutter_tools/test/create_test.dart
View file @
abba2ebc
...
...
@@ -7,7 +7,6 @@ import 'dart:convert';
import
'dart:io'
;
import
'package:args/command_runner.dart'
;
import
'package:flutter_tools/src/base/logger.dart'
;
import
'package:flutter_tools/src/cache.dart'
;
import
'package:flutter_tools/src/commands/create.dart'
;
import
'package:flutter_tools/src/dart/sdk.dart'
;
...
...
@@ -84,7 +83,6 @@ void main() {
});
// Verify that we help the user correct an option ordering issue
BufferLogger
logger
=
new
BufferLogger
();
testUsingContext
(
'produces sensible error message'
,
()
async
{
Cache
.
flutterRoot
=
'../..'
;
...
...
@@ -93,9 +91,7 @@ void main() {
int
code
=
await
runner
.
run
(<
String
>[
'create'
,
temp
.
path
,
'--pub'
]);
expect
(
code
,
2
);
expect
(
logger
.
errorText
,
contains
(
'Try moving --pub'
));
},
overrides:
<
Type
,
dynamic
>{
Logger:
logger
,
expect
(
testLogger
.
errorText
,
contains
(
'Try moving --pub'
));
});
// Verify that we fail with an error code when the file exists.
...
...
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