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
bb732b46
Commit
bb732b46
authored
Jun 26, 2017
by
Chris Bracken
Committed by
GitHub
Jun 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add tests for xcodeVersionSatisfactory (#10981)
And fix a typo in a test description.
parent
e04907a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
1 deletion
+33
-1
mac_test.dart
packages/flutter_tools/test/ios/mac_test.dart
+33
-1
No files found.
packages/flutter_tools/test/ios/mac_test.dart
View file @
bb732b46
...
...
@@ -148,7 +148,7 @@ void main() {
ProcessManager:
()
=>
mockProcessManager
,
});
testUsingContext
(
'xcodeM
aj
orVersion is null when version has unexpected format'
,
()
{
testUsingContext
(
'xcodeM
in
orVersion is null when version has unexpected format'
,
()
{
when
(
mockProcessManager
.
runSync
(<
String
>[
'/usr/bin/xcodebuild'
,
'-version'
]))
.
thenReturn
(
new
ProcessResult
(
1
,
0
,
'Xcode Ultra5000
\n
Build version 8E3004b'
,
''
));
expect
(
xcode
.
xcodeMinorVersion
,
isNull
);
...
...
@@ -156,6 +156,38 @@ void main() {
ProcessManager:
()
=>
mockProcessManager
,
});
testUsingContext
(
'xcodeVersionSatisfactory is false when version is less than minimum'
,
()
{
when
(
mockProcessManager
.
runSync
(<
String
>[
'/usr/bin/xcodebuild'
,
'-version'
]))
.
thenReturn
(
new
ProcessResult
(
1
,
0
,
'Xcode 7.0.1
\n
Build version 7A1001'
,
''
));
expect
(
xcode
.
xcodeVersionSatisfactory
,
isFalse
);
},
overrides:
<
Type
,
Generator
>{
ProcessManager:
()
=>
mockProcessManager
,
});
testUsingContext
(
'xcodeVersionSatisfactory is false when version in unknown format'
,
()
{
when
(
mockProcessManager
.
runSync
(<
String
>[
'/usr/bin/xcodebuild'
,
'-version'
]))
.
thenReturn
(
new
ProcessResult
(
1
,
0
,
'Xcode SuperHD
\n
Build version 7A1001'
,
''
));
expect
(
xcode
.
xcodeVersionSatisfactory
,
isFalse
);
},
overrides:
<
Type
,
Generator
>{
ProcessManager:
()
=>
mockProcessManager
,
});
testUsingContext
(
'xcodeVersionSatisfactory is true when version meets minimum'
,
()
{
when
(
mockProcessManager
.
runSync
(<
String
>[
'/usr/bin/xcodebuild'
,
'-version'
]))
.
thenReturn
(
new
ProcessResult
(
1
,
0
,
'Xcode 8.3.3
\n
Build version 8E3004b'
,
''
));
expect
(
xcode
.
xcodeVersionSatisfactory
,
isTrue
);
},
overrides:
<
Type
,
Generator
>{
ProcessManager:
()
=>
mockProcessManager
,
});
testUsingContext
(
'xcodeVersionSatisfactory is true when version exceeds minimum'
,
()
{
when
(
mockProcessManager
.
runSync
(<
String
>[
'/usr/bin/xcodebuild'
,
'-version'
]))
.
thenReturn
(
new
ProcessResult
(
1
,
0
,
'Xcode 9.0
\n
Build version 9M137d'
,
''
));
expect
(
xcode
.
xcodeVersionSatisfactory
,
isTrue
);
},
overrides:
<
Type
,
Generator
>{
ProcessManager:
()
=>
mockProcessManager
,
});
testUsingContext
(
'eulaSigned is false when clang is not installed'
,
()
{
when
(
mockProcessManager
.
runSync
(<
String
>[
'/usr/bin/xcrun'
,
'clang'
]))
.
thenThrow
(
const
ProcessException
(
'/usr/bin/xcrun'
,
const
<
String
>[
'clang'
]));
...
...
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