Open
Conversation
Xiaoy312
commented
Apr 12, 2023
src/Uno.UI.RuntimeTests.Engine.Library/UI/UnitTestsControl.Filtering.cs
Outdated
Show resolved
Hide resolved
Contributor
Author
|
todo:
|
agneszitte
reviewed
Apr 12, 2023
src/Uno.UI.RuntimeTests.Engine.Library/UI/UnitTestsControl.Filtering.cs
Outdated
Show resolved
Hide resolved
kazo0
reviewed
Apr 12, 2023
src/Uno.UI.RuntimeTests.Engine.Library/UI/UnitTestsControl.Filtering.cs
Outdated
Show resolved
Hide resolved
f2516c1 to
8ce91be
Compare
8ce91be to
a3d454f
Compare
e4d8bb3 to
4b37deb
Compare
agneszitte
reviewed
May 23, 2023
Comment on lines
+164
to
+174
| ## Test runner (UnitTestsControl) filtering syntax | ||
| - Search terms are separated by space. Multiple consecutive spaces are treated same as one. | ||
| - Multiple search terms are chained with AND logic. | ||
| - Search terms are case insensitive. | ||
| - `-` can be used before any term for exclusion, effectively inverting the results. | ||
| - Special tags can be used to match certain part of the test: // syntax: tag:term | ||
| - `class` or `c` matches the class name | ||
| - `method` or `m` matches the method name | ||
| - `displayname` or `d` matches the display name in [DataRow] | ||
| - Search term without a prefixing tag will match either of method name or class name. | ||
|
|
Contributor
There was a problem hiding this comment.
Suggested change
| ## Test runner (UnitTestsControl) filtering syntax | |
| - Search terms are separated by space. Multiple consecutive spaces are treated same as one. | |
| - Multiple search terms are chained with AND logic. | |
| - Search terms are case insensitive. | |
| - `-` can be used before any term for exclusion, effectively inverting the results. | |
| - Special tags can be used to match certain part of the test: // syntax: tag:term | |
| - `class` or `c` matches the class name | |
| - `method` or `m` matches the method name | |
| - `displayname` or `d` matches the display name in [DataRow] | |
| - Search term without a prefixing tag will match either of method name or class name. | |
| ## Test runner (UnitTestsControl) filtering syntax | |
| - Search terms are separated by space. Multiple consecutive spaces are treated the same as one. | |
| - Multiple search terms are chained with AND logic. | |
| - Search terms are case insensitive. | |
| - `-` can be used before any term for exclusion, effectively inverting the results. | |
| - Special tags can be used to match certain parts of the test: // syntax: tag:term | |
| - `class` or `c` matches the class name | |
| - `method` or `m` matches the method name | |
| - `displayname` or `d` matches the display name in [DataRow] | |
| - Search term without a prefixing tag will match either method name or class name. | |
| internal static partial class StringExtensions | ||
| { | ||
| /// <summary> | ||
| /// Like <see cref="string.Split(char[])"/>, but allows exception to be made with a Regex pattern. |
Contributor
There was a problem hiding this comment.
Suggested change
| /// Like <see cref="string.Split(char[])"/>, but allows exception to be made with a Regex pattern. | |
| /// Like <see cref="string.Split(char[])"/>, but allows exceptions to be made with a Regex pattern. |
| /// </summary> | ||
| /// <param name="input"></param> | ||
| /// <param name="separator"></param> | ||
| /// <param name="ignoredPattern">segments matched by the regex will not be splited.</param> |
Contributor
There was a problem hiding this comment.
Suggested change
| /// <param name="ignoredPattern">segments matched by the regex will not be splited.</param> | |
| /// <param name="ignoredPattern">segments matched by the regex will not be split.</param> |
| }) | ||
| .Where(x => filters?.MatchAllOnlyIfValuePresent(KnownTags.Parameters, x.Parameters) ?? true) | ||
| .Where(x => filters?.MatchAllOnlyIf(KnownTags.AtIndex, x.IsDataSourced, y => MatchIndex(y, x.Index)) ?? true) | ||
| // fixme: DisplayName will also matches parameters |
Contributor
There was a problem hiding this comment.
Suggested change
| // fixme: DisplayName will also matches parameters | |
| // fixme: DisplayName will also match the parameters |
| /// </summary> | ||
| /// <param name="tag"></param> | ||
| /// <param name="value"></param> | ||
| /// <returns>If all 'tag' filters matches the value, or true if the none filters are of 'tag'.</returns> |
Contributor
There was a problem hiding this comment.
Suggested change
| /// <returns>If all 'tag' filters matches the value, or true if the none filters are of 'tag'.</returns> | |
| /// <returns>If all 'tag' filters match the value, or true if the none filters are of 'tag'.</returns> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GitHub Issue (If applicable): #89
PR Type
What kind of change does this PR introduce?
What is the new behavior?
new improved query syntax:
-can be used before any term for exclusion, effectively filtering them outtag:match_textclassorcmatches the class namemethodormmatches the method namedisplay_nameordmatches the display name in[DataRow]or[DynamicData]full_nameorfmatches the full name of methodparamsorpmatches the parameters of[DataRow]or[DynamicData](unrolled)ator@(without colon) matches the[DataRow]or[DynamicData]case at specific index (DynamicData: index within the source),can be used to specify multiple potential matches (chained by OR logic)\"to escape double-quote within a double-quoted match text:^and$to perform head or tail match, or both to perform full matchPR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information
Currently we can match multiple tests (by OR logics) via
;delimiter. This is no longer supported in the new syntax.