| Index: packages/matcher/lib/src/string_matchers.dart
|
| diff --git a/packages/matcher/lib/src/string_matchers.dart b/packages/matcher/lib/src/string_matchers.dart
|
| index d8bbdb83ec5961c3ad0462428b3acaa3a3fc6ab8..14e6fbb61692b66307faf76a26c91757dbc6014e 100644
|
| --- a/packages/matcher/lib/src/string_matchers.dart
|
| +++ b/packages/matcher/lib/src/string_matchers.dart
|
| @@ -118,15 +118,16 @@ class _StringContainsInOrder extends _StringMatcher {
|
| const _StringContainsInOrder(this._substrings);
|
|
|
| bool matches(item, Map matchState) {
|
| - if (!(item is String)) {
|
| + if (item is String) {
|
| + var from_index = 0;
|
| + for (var s in _substrings) {
|
| + from_index = item.indexOf(s, from_index);
|
| + if (from_index < 0) return false;
|
| + }
|
| + return true;
|
| + } else {
|
| return false;
|
| }
|
| - var from_index = 0;
|
| - for (var s in _substrings) {
|
| - from_index = item.indexOf(s, from_index);
|
| - if (from_index < 0) return false;
|
| - }
|
| - return true;
|
| }
|
|
|
| Description describe(Description description) => description.addAll(
|
|
|