quicktheories / QuickTheories

Property based testing for Java 8
Apache License 2.0
505 stars 51 forks source link

String generator generates faulty Strings when using basicMultilingualPlaneAlphabet() or allPossible() #41

Open jellenelis opened 6 years ago

jellenelis commented 6 years ago

A Gen generated by StringsDSL.basicMultilingualPlaneAlphabet() or StringsDSL.allPossible() generate Strings with isolated (Unicode surrogates). I see that the code relies on Character.isDefined() to filter possible values. Apparently it assumes isolated surrogates are defined characters, but that assumption leads to errors once the String is decoded and encoded somewhere.