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
Among the arbitraries provided by fast-check, some of them would need to have a lower-case only version plus a mixed-case version.
Indeed by default Ipv6 addresses or UUID or hexaString are using lower-case characters only. But it would be quite useful to offer a mixed-case version for each of them to diagnose issues using even stranger entries.
Implementing a mixedCase(arb: Arbitrary<string>): Arbitrary<string> can be done with a basic chain but it comes with a poor shrinker. As the need is not restricted to one precise case it should be part of the basic arbitraries provided by fast-check.
Example
fc.mixedCase(fc.hexaString()) might produce 0Ee5bA while hexaString only was limited to 0ee5ba.
The text was updated successfully, but these errors were encountered:
* Add mixedCase arbitrary
Fixes#426
* Extract countToggledBits outside of the class
* Remove unused code
* Extract computeNextFlags
* Draft units
* Fix MixedCaseArbitrary tests
* Add basic itest for mixedCase
* Add more units
* Bug for flags=2n, nextSize=1
* Add units related to shrinker
* Update snapshots
* Better jsdoc
* Do not shrink on string if we shrunk on bigint before
* Update markdown documentation
* Add warning concerning the need for bigint support
* Lint code
🚀 Feature Request
Add
mixedCase(arb: Arbitrary<string>): Arbitrary<string>
Motivation
Among the arbitraries provided by fast-check, some of them would need to have a lower-case only version plus a mixed-case version.
Indeed by default Ipv6 addresses or UUID or hexaString are using lower-case characters only. But it would be quite useful to offer a mixed-case version for each of them to diagnose issues using even stranger entries.
Implementing a
mixedCase(arb: Arbitrary<string>): Arbitrary<string>
can be done with a basicchain
but it comes with a poor shrinker. As the need is not restricted to one precise case it should be part of the basic arbitraries provided by fast-check.Example
fc.mixedCase(fc.hexaString())
might produce0Ee5bA
whilehexaString
only was limited to0ee5ba
.The text was updated successfully, but these errors were encountered: