| Index: pkg/analysis_server/test/integration/integration_tests.dart
|
| diff --git a/pkg/analysis_server/test/integration/integration_tests.dart b/pkg/analysis_server/test/integration/integration_tests.dart
|
| index dbd26a72f4485857e07da8d05a53be2e54eb4d35..01e6ba086c4a2bc219fa9a9792cba4e2f80c1f87 100644
|
| --- a/pkg/analysis_server/test/integration/integration_tests.dart
|
| +++ b/pkg/analysis_server/test/integration/integration_tests.dart
|
| @@ -288,6 +288,32 @@ abstract class _RecursiveMatcher extends Matcher {
|
| }
|
|
|
| /**
|
| + * Matcher that matches a String drawn from a limited set.
|
| + */
|
| +class MatchesEnum extends Matcher {
|
| + /**
|
| + * Short description of the expected type.
|
| + */
|
| + final String description;
|
| +
|
| + /**
|
| + * The set of enum values that are allowed.
|
| + */
|
| + final List<String> allowedValues;
|
| +
|
| + const MatchesEnum(this.description, this.allowedValues);
|
| +
|
| + @override
|
| + bool matches(item, Map matchState) {
|
| + return allowedValues.contains(item);
|
| + }
|
| +
|
| + @override
|
| + Description describe(Description description) => description.add(
|
| + this.description);
|
| +}
|
| +
|
| +/**
|
| * Matcher that matches a JSON object, with a given set of required and
|
| * optional fields, and their associated types (expressed as [Matcher]s).
|
| */
|
|
|