Add some more framework.dart tests (#7469)

This commit is contained in:
Adam Barth
2017-01-12 15:08:16 -08:00
committed by GitHub
parent 6737712067
commit 3c33bb4697
4 changed files with 93 additions and 6 deletions

View File

@@ -66,6 +66,12 @@ const Matcher isNotInCard = const _IsNotInCard();
/// empty, and does not contain the default `Instance of ...` string.
const Matcher hasOneLineDescription = const _HasOneLineDescription();
/// A matcher for functions that throw [FlutterError].
const Matcher throwsFlutterError = const Throws(isFlutterError);
/// A matcher for [FlutterError].
const Matcher isFlutterError = const isInstanceOf<FlutterError>();
/// Asserts that two [double]s are equal, within some tolerated error.
///
/// Two values are considered equal if the difference between them is within
@@ -268,4 +274,4 @@ class _MoreOrLessEquals extends Matcher {
@override
Description describe(Description description) => description.add('$value (±$epsilon)');
}
}