File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -320,8 +320,12 @@ void main() {
320
320
emojiUnicode: tryParseEmojiCodeToUnicode (emojiCode)! ));
321
321
}
322
322
323
+ bool matchesNames (String query, List <String > names) {
324
+ return EmojiAutocompleteQuery (query).matches (unicode (names));
325
+ }
326
+
323
327
bool matchesName (String query, String emojiName) {
324
- return EmojiAutocompleteQuery (query). matches ( unicode ( [emojiName]) );
328
+ return matchesNames (query, [emojiName]);
325
329
}
326
330
327
331
test ('one-word query matches anywhere in name' , () {
@@ -370,10 +374,6 @@ void main() {
370
374
});
371
375
372
376
test ('query matches aliases same way as primary name' , () {
373
- bool matchesNames (String query, List <String > names) {
374
- return EmojiAutocompleteQuery (query).matches (unicode (names));
375
- }
376
-
377
377
check (matchesNames ('a' , ['a' , 'b' ])).isTrue ();
378
378
check (matchesNames ('b' , ['a' , 'b' ])).isTrue ();
379
379
check (matchesNames ('c' , ['a' , 'b' ])).isFalse ();
You can’t perform that action at this time.
0 commit comments