Open
Description
Description
RegexValue
can throw IllegalArgumentException
if maxLength
argument less (or default random value less) then minimal length of pattern.
To Reproduce
Steps to reproduce the behavior:
- Try to run this code (
maxLength
less then length of regexpattern
):
RegexValue("""COMPLETED:\g<1>T120000Z""", Random(0), 16).valueProvider()
Expected behavior
Valid value provider
Actual behavior
Exception IllegalArgumentException
Visual proofs (screenshots, logs, images)
Exception in thread "main" java.lang.IllegalArgumentException: Length cannot be less than 22
at org.cornutum.regexpgen.Bounds.clippedTo(Bounds.java:72)
at org.cornutum.regexpgen.RegExpGen.effectiveLength(RegExpGen.java:89)
at org.cornutum.regexpgen.js.AbstractRegExpGen.generate(AbstractRegExpGen.java:102)
at org.cornutum.regexpgen.RegExpGen.generate(RegExpGen.java:61)
at org.utbot.fuzzing.seeds.RegexValue$1.invoke(RegexValue.kt:16)
at org.utbot.fuzzing.seeds.RegexValue$1.invoke(RegexValue.kt:14)
at org.utbot.fuzzing.seeds.RegexValueKt.main(RegexValue.kt:38)
at org.utbot.fuzzing.seeds.RegexValueKt.main(RegexValue.kt)
Metadata
Metadata
Assignees
Type
Projects
Status
Todo