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
c233f382
Commit
c233f382
authored
Feb 18, 2017
by
Todd Volkert
Committed by
GitHub
Feb 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update package:test dependencies to `0.12.18+2` (#8247)
parent
4e531f64
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
56 additions
and
52 deletions
+56
-52
pubspec.yaml
dev/devicelab/pubspec.yaml
+1
-1
curves_test.dart
packages/flutter/test/animation/curves_test.dart
+20
-20
covariant_templates_test.dart
...ges/flutter/test/foundation/covariant_templates_test.dart
+2
-2
text_style_test.dart
packages/flutter/test/painting/text_style_test.dart
+1
-1
debug_test.dart
packages/flutter/test/scheduler/debug_test.dart
+5
-5
notification_test.dart
packages/flutter/test/widgets/notification_test.dart
+1
-1
scroll_controller_test.dart
packages/flutter/test/widgets/scroll_controller_test.dart
+3
-3
set_state_4_test.dart
packages/flutter/test/widgets/set_state_4_test.dart
+3
-3
pubspec.yaml
packages/flutter_driver/pubspec.yaml
+1
-1
matchers.dart
packages/flutter_test/lib/src/matchers.dart
+7
-1
widget_tester.dart
packages/flutter_test/lib/src/widget_tester.dart
+2
-4
pubspec.yaml
packages/flutter_test/pubspec.yaml
+1
-1
pubspec.yaml
packages/flutter_tools/pubspec.yaml
+1
-1
drive_test.dart
packages/flutter_tools/test/drive_test.dart
+6
-6
common.dart
packages/flutter_tools/test/src/common.dart
+2
-2
No files found.
dev/devicelab/pubspec.yaml
View file @
c233f382
...
...
@@ -16,4 +16,4 @@ dependencies:
dev_dependencies
:
# See packages/flutter_test/pubspec.yaml for why we're pinning this version.
test
:
0.12.1
5+9
test
:
0.12.1
8+2
packages/flutter/test/animation/curves_test.dart
View file @
c233f382
...
...
@@ -105,35 +105,35 @@ void main() {
});
test
(
'Invalid transform parameter should assert'
,
()
{
expect
(()
=>
const
SawTooth
(
2
).
transform
(-
0.0001
),
throws
);
expect
(()
=>
const
SawTooth
(
2
).
transform
(
1.0001
),
throws
);
expect
(()
=>
const
SawTooth
(
2
).
transform
(-
0.0001
),
throws
AssertionError
);
expect
(()
=>
const
SawTooth
(
2
).
transform
(
1.0001
),
throws
AssertionError
);
expect
(()
=>
const
Interval
(
0.0
,
1.0
).
transform
(-
0.0001
),
throws
);
expect
(()
=>
const
Interval
(
0.0
,
1.0
).
transform
(
1.0001
),
throws
);
expect
(()
=>
const
Interval
(
0.0
,
1.0
).
transform
(-
0.0001
),
throws
AssertionError
);
expect
(()
=>
const
Interval
(
0.0
,
1.0
).
transform
(
1.0001
),
throws
AssertionError
);
expect
(()
=>
const
Threshold
(
0.5
).
transform
(-
0.0001
),
throws
);
expect
(()
=>
const
Threshold
(
0.5
).
transform
(
1.0001
),
throws
);
expect
(()
=>
const
Threshold
(
0.5
).
transform
(-
0.0001
),
throws
AssertionError
);
expect
(()
=>
const
Threshold
(
0.5
).
transform
(
1.0001
),
throws
AssertionError
);
expect
(()
=>
const
ElasticInCurve
().
transform
(-
0.0001
),
throws
);
expect
(()
=>
const
ElasticInCurve
().
transform
(
1.0001
),
throws
);
expect
(()
=>
const
ElasticInCurve
().
transform
(-
0.0001
),
throws
AssertionError
);
expect
(()
=>
const
ElasticInCurve
().
transform
(
1.0001
),
throws
AssertionError
);
expect
(()
=>
const
ElasticOutCurve
().
transform
(-
0.0001
),
throws
);
expect
(()
=>
const
ElasticOutCurve
().
transform
(
1.0001
),
throws
);
expect
(()
=>
const
ElasticOutCurve
().
transform
(-
0.0001
),
throws
AssertionError
);
expect
(()
=>
const
ElasticOutCurve
().
transform
(
1.0001
),
throws
AssertionError
);
expect
(()
=>
const
Cubic
(
0.42
,
0.0
,
0.58
,
1.0
).
transform
(-
0.0001
),
throws
);
expect
(()
=>
const
Cubic
(
0.42
,
0.0
,
0.58
,
1.0
).
transform
(
1.0001
),
throws
);
expect
(()
=>
const
Cubic
(
0.42
,
0.0
,
0.58
,
1.0
).
transform
(-
0.0001
),
throws
AssertionError
);
expect
(()
=>
const
Cubic
(
0.42
,
0.0
,
0.58
,
1.0
).
transform
(
1.0001
),
throws
AssertionError
);
expect
(()
=>
Curves
.
decelerate
.
transform
(-
0.0001
),
throws
);
expect
(()
=>
Curves
.
decelerate
.
transform
(
1.0001
),
throws
);
expect
(()
=>
Curves
.
decelerate
.
transform
(-
0.0001
),
throws
AssertionError
);
expect
(()
=>
Curves
.
decelerate
.
transform
(
1.0001
),
throws
AssertionError
);
expect
(()
=>
Curves
.
bounceIn
.
transform
(-
0.0001
),
throws
);
expect
(()
=>
Curves
.
bounceIn
.
transform
(
1.0001
),
throws
);
expect
(()
=>
Curves
.
bounceIn
.
transform
(-
0.0001
),
throws
AssertionError
);
expect
(()
=>
Curves
.
bounceIn
.
transform
(
1.0001
),
throws
AssertionError
);
expect
(()
=>
Curves
.
bounceOut
.
transform
(-
0.0001
),
throws
);
expect
(()
=>
Curves
.
bounceOut
.
transform
(
1.0001
),
throws
);
expect
(()
=>
Curves
.
bounceOut
.
transform
(-
0.0001
),
throws
AssertionError
);
expect
(()
=>
Curves
.
bounceOut
.
transform
(
1.0001
),
throws
AssertionError
);
expect
(()
=>
Curves
.
bounceInOut
.
transform
(-
0.0001
),
throws
);
expect
(()
=>
Curves
.
bounceInOut
.
transform
(
1.0001
),
throws
);
expect
(()
=>
Curves
.
bounceInOut
.
transform
(-
0.0001
),
throws
AssertionError
);
expect
(()
=>
Curves
.
bounceInOut
.
transform
(
1.0001
),
throws
AssertionError
);
});
}
packages/flutter/test/foundation/covariant_templates_test.dart
View file @
c233f382
...
...
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:
test/
test.dart'
;
import
'package:
flutter_test/flutter_
test.dart'
;
class
X
{}
...
...
@@ -18,6 +18,6 @@ void main() {
A
<
X
>
ayAsAx
=
ay
;
expect
(()
{
ayAsAx
.
u
=
new
X
();
},
throws
);
},
throws
AssertionError
);
});
}
packages/flutter/test/painting/text_style_test.dart
View file @
c233f382
...
...
@@ -14,7 +14,7 @@ void main() {
fontWeight:
FontWeight
.
w800
,
height:
123.0
,
);
expect
(()
{
s1
.
fontFamily
=
'test'
;
},
throws
);
// ignore: ASSIGNMENT_TO_FINAL
expect
(()
{
s1
.
fontFamily
=
'test'
;
},
throws
A
(
isNoSuchMethodError
)
);
// ignore: ASSIGNMENT_TO_FINAL
expect
(
s1
.
fontFamily
,
isNull
);
expect
(
s1
.
fontSize
,
10.0
);
expect
(
s1
.
fontWeight
,
FontWeight
.
w800
);
...
...
packages/flutter/test/scheduler/debug_test.dart
View file @
c233f382
...
...
@@ -3,31 +3,31 @@
// found in the LICENSE file.
import
'package:flutter/scheduler.dart'
;
import
'package:
test/
test.dart'
;
import
'package:
flutter_test/flutter_
test.dart'
;
void
main
(
)
{
test
(
'debugAssertAllSchedulerVarsUnset control test'
,
()
{
expect
(()
{
debugAssertAllSchedulerVarsUnset
(
'Example test'
);
},
isNot
(
throws
));
},
isNot
(
throws
FlutterError
));
debugPrintBeginFrameBanner
=
true
;
expect
(()
{
debugAssertAllSchedulerVarsUnset
(
'Example test'
);
},
throws
);
},
throws
FlutterError
);
debugPrintBeginFrameBanner
=
false
;
debugPrintEndFrameBanner
=
true
;
expect
(()
{
debugAssertAllSchedulerVarsUnset
(
'Example test'
);
},
throws
);
},
throws
FlutterError
);
debugPrintEndFrameBanner
=
false
;
expect
(()
{
debugAssertAllSchedulerVarsUnset
(
'Example test'
);
},
isNot
(
throws
));
},
isNot
(
throws
FlutterError
));
});
}
packages/flutter/test/widgets/notification_test.dart
View file @
c233f382
...
...
@@ -66,6 +66,6 @@ void main() {
onNotification:
(
MyNotification
value
)
{
},
child:
new
Container
(
key:
key
),
));
expect
(()
{
new
MyNotification
().
dispatch
(
key
.
currentContext
);
},
throwsA
(
const
isInstanceOf
<
AssertionError
>())
);
expect
(()
{
new
MyNotification
().
dispatch
(
key
.
currentContext
);
},
throwsA
ssertionError
);
});
}
packages/flutter/test/widgets/scroll_controller_test.dart
View file @
c233f382
...
...
@@ -76,12 +76,12 @@ void main() {
}).
toList
()
));
expect
(()
=>
controller
.
offset
,
throws
);
expect
(()
=>
controller
.
offset
,
throws
AssertionError
);
expect
(
controller2
.
offset
,
equals
(
653.0
));
expect
(
realOffset
(),
equals
(
controller2
.
offset
));
expect
(()
=>
controller
.
jumpTo
(
120.0
),
throws
);
expect
(()
=>
controller
.
animateTo
(
132.0
,
duration:
const
Duration
(
milliseconds:
300
),
curve:
Curves
.
ease
),
throws
);
expect
(()
=>
controller
.
jumpTo
(
120.0
),
throws
AssertionError
);
expect
(()
=>
controller
.
animateTo
(
132.0
,
duration:
const
Duration
(
milliseconds:
300
),
curve:
Curves
.
ease
),
throws
AssertionError
);
await
tester
.
pumpWidget
(
new
ListView
(
key:
const
Key
(
'second'
),
...
...
packages/flutter/test/widgets/set_state_4_test.dart
View file @
c233f382
...
...
@@ -23,8 +23,8 @@ void main() {
testWidgets
(
'setState() catches being used with an async callback'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
new
Changer
());
ChangerState
s
=
tester
.
state
(
find
.
byType
(
Changer
));
expect
(
s
.
test0
,
isNot
(
throws
));
expect
(
s
.
test1
,
isNot
(
throws
));
expect
(
s
.
test2
,
throws
);
expect
(
s
.
test0
,
isNot
(
throws
FlutterError
));
expect
(
s
.
test1
,
isNot
(
throws
FlutterError
));
expect
(
s
.
test2
,
throws
FlutterError
);
});
}
packages/flutter_driver/pubspec.yaml
View file @
c233f382
...
...
@@ -20,6 +20,6 @@ dependencies:
sdk
:
flutter
dev_dependencies
:
test
:
0.12.1
5+9
test
:
0.12.1
8+2
mockito
:
^1.0.0
quiver
:
^0.24.0
packages/flutter_test/lib/src/matchers.dart
View file @
c233f382
...
...
@@ -67,11 +67,17 @@ const Matcher isNotInCard = const _IsNotInCard();
const
Matcher
hasOneLineDescription
=
const
_HasOneLineDescription
();
/// A matcher for functions that throw [FlutterError].
const
Matcher
throwsFlutterError
=
const
Throws
(
isFlutterError
);
Matcher
throwsFlutterError
=
throwsA
(
isFlutterError
);
/// A matcher for functions that throw [AssertionError].
Matcher
throwsAssertionError
=
throwsA
(
isAssertionError
);
/// A matcher for [FlutterError].
const
Matcher
isFlutterError
=
const
isInstanceOf
<
FlutterError
>();
/// A matcher for [AssertionError].
const
Matcher
isAssertionError
=
const
isInstanceOf
<
AssertionError
>();
/// Asserts that two [double]s are equal, within some tolerated error.
///
/// Two values are considered equal if the difference between them is within
...
...
packages/flutter_test/lib/src/widget_tester.dart
View file @
c233f382
...
...
@@ -120,10 +120,9 @@ Future<Null> benchmarkWidgets(WidgetTesterCallback callback) {
void
expect
(
dynamic
actual
,
dynamic
matcher
,
{
String
reason
,
bool
verbose:
false
,
dynamic
formatter
})
{
TestAsyncUtils
.
guardSync
();
test_package
.
expect
(
actual
,
matcher
,
reason:
reason
,
verbose:
verbose
,
formatter:
formatter
);
test_package
.
expect
(
actual
,
matcher
,
reason:
reason
,
verbose:
verbose
);
}
/// Assert that `actual` matches `matcher`.
...
...
@@ -138,9 +137,8 @@ void expect(dynamic actual, dynamic matcher, {
void
expectSync
(
dynamic
actual
,
dynamic
matcher
,
{
String
reason
,
bool
verbose:
false
,
dynamic
formatter
})
{
test_package
.
expect
(
actual
,
matcher
,
reason:
reason
,
verbose:
verbose
,
formatter:
formatter
);
test_package
.
expect
(
actual
,
matcher
,
reason:
reason
,
verbose:
verbose
);
}
/// Class that programmatically interacts with widgets and the test environment.
...
...
packages/flutter_test/pubspec.yaml
View file @
c233f382
...
...
@@ -5,7 +5,7 @@ dependencies:
# The flutter tools depend on very specific internal implementation
# details of the 'test' package, which change between versions, so
# here we pin it precisely to avoid version skew across our packages.
test
:
0.12.1
5+9
test
:
0.12.1
8+2
flutter
:
sdk
:
flutter
packages/flutter_tools/pubspec.yaml
View file @
c233f382
...
...
@@ -34,7 +34,7 @@ dependencies:
# We depend on very specific internal implementation details of the
# 'test' package, which change between versions, so here we pin it
# precisely.
test
:
0.12.1
5+9
test
:
0.12.1
8+2
# Version from the vended Dart SDK as defined in `dependency_overrides`.
analyzer
:
any
...
...
packages/flutter_tools/test/drive_test.dart
View file @
c233f382
...
...
@@ -88,7 +88,7 @@ void main() {
testUsingContext
(
'returns 1 when app fails to run'
,
()
async
{
withMockDevice
();
appStarter
=
expectAsync
((
DriveCommand
command
)
async
=>
null
);
appStarter
=
expectAsync
1
((
DriveCommand
command
)
async
=>
null
);
String
testApp
=
fs
.
path
.
join
(
cwd
.
path
,
'test_driver'
,
'e2e.dart'
);
String
testFile
=
fs
.
path
.
join
(
cwd
.
path
,
'test_driver'
,
'e2e_test.dart'
);
...
...
@@ -157,14 +157,14 @@ void main() {
String
testApp
=
fs
.
path
.
join
(
cwd
.
path
,
'test'
,
'e2e.dart'
);
String
testFile
=
fs
.
path
.
join
(
cwd
.
path
,
'test_driver'
,
'e2e_test.dart'
);
appStarter
=
expectAsync
((
DriveCommand
command
)
async
{
appStarter
=
expectAsync
1
((
DriveCommand
command
)
async
{
return
new
LaunchResult
.
succeeded
();
});
testRunner
=
expectAsync
((
List
<
String
>
testArgs
,
String
observatoryUri
)
async
{
testRunner
=
expectAsync
2
((
List
<
String
>
testArgs
,
String
observatoryUri
)
async
{
expect
(
testArgs
,
<
String
>[
testFile
]);
return
null
;
});
appStopper
=
expectAsync
((
DriveCommand
command
)
async
{
appStopper
=
expectAsync
1
((
DriveCommand
command
)
async
{
return
true
;
});
...
...
@@ -188,13 +188,13 @@ void main() {
String
testApp
=
fs
.
path
.
join
(
cwd
.
path
,
'test'
,
'e2e.dart'
);
String
testFile
=
fs
.
path
.
join
(
cwd
.
path
,
'test_driver'
,
'e2e_test.dart'
);
appStarter
=
expectAsync
((
DriveCommand
command
)
async
{
appStarter
=
expectAsync
1
((
DriveCommand
command
)
async
{
return
new
LaunchResult
.
succeeded
();
});
testRunner
=
(
List
<
String
>
testArgs
,
String
observatoryUri
)
async
{
throwToolExit
(
null
,
exitCode:
123
);
};
appStopper
=
expectAsync
((
DriveCommand
command
)
async
{
appStopper
=
expectAsync
1
((
DriveCommand
command
)
async
{
return
true
;
});
...
...
packages/flutter_tools/test/src/common.dart
View file @
c233f382
...
...
@@ -37,8 +37,8 @@ void updateFileModificationTime(String path,
/// Matcher for functions that throw ToolExit.
Matcher
throwsToolExit
(
[
int
exitCode
])
{
return
exitCode
==
null
?
const
Throws
(
isToolExit
)
:
new
Throws
(
allOf
(
isToolExit
,
(
ToolExit
e
)
=>
e
.
exitCode
==
exitCode
));
?
throwsA
(
isToolExit
)
:
throwsA
(
allOf
(
isToolExit
,
(
ToolExit
e
)
=>
e
.
exitCode
==
exitCode
));
}
/// Matcher for [ToolExit]s.
...
...
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