1
0
mirror of https://github.com/flutter/samples.git synced 2025-11-08 22:09:06 +00:00

Add type param filter (#596)

Format code
Add match by type tests
This commit is contained in:
Sashika Nawarathne
2020-11-17 23:50:00 +05:30
committed by GitHub
parent 1091fb1f33
commit a0d314bf5e
4 changed files with 23 additions and 4 deletions

View File

@@ -107,7 +107,8 @@ void main() {
'widget:AnimatedBuilder '
'widget:FutureBuilder '
'package:json_serializable '
'package:path';
'package:path '
'type:sample';
// Test if various queries match these attributes
expect(matchesQuery('foo', attributes), false);
@@ -124,6 +125,11 @@ void main() {
expect(matchesQuery('kitten tag:cats', attributes), true);
expect(matchesQuery('tag:beginner dogs', attributes), false);
expect(matchesQuery('asdf ', attributes), false);
// Test if queries match by type
expect(matchesQuery('type:sample', attributes), true);
expect(matchesQuery('type:cookbook', attributes), false);
expect(matchesQuery('kittens type:cookbook', attributes), false);
});
});