You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, it has also been widely used to generate regular expressions, which will lead to some failures after random_seed is introduced in IT, like #10064. It is because it generated some valid/invalid regular expressions, and caused unexpected results.
I wish we can have a better function or even DataGen class to generate random regexp data, which could include:
random literal strings
some random valid regular expressions
some random invalid regular expressions
So the test data will not randomly break regex IT and will be stronger than letting it generate regexps by chance.
Some tests:
If adding some special cases (which can be generated by '.{0,10}') in mk_str_gen:
I'm also not sure why we need this special case '.{0,10}' when generating regexps, if we don't need it, an easy way is to just remove it and use stringGen or literal directly.
Given @revans2 comment in #10093 (comment) , it seems like we are not using mk_str_gen to generate regular expressions. Can you point out where we might actually be generating a regular expression?
In Integration tests, we often use
mk_str_gen
to generate test strings:However, it has also been widely used to generate regular expressions, which will lead to some failures after random_seed is introduced in IT, like #10064. It is because it generated some valid/invalid regular expressions, and caused unexpected results.
I wish we can have a better function or even DataGen class to generate random regexp data, which could include:
So the test data will not randomly break regex IT and will be stronger than letting it generate regexps by chance.
Some tests:
If adding some special cases (which can be generated by
'.{0,10}'
) inmk_str_gen
:and run:
we will get:
The text was updated successfully, but these errors were encountered: