Annotation Interface WithUtf8Length
An annotation that applies to
String
to limit the length of the UTF-8
encoding of the string. In practical terms, this means that strings given this
annotation will sometimes have a String.length()
of less than min
but will never
exceed max
.
Due to the fact that our String mutator is backed by the byte array mutator, it's difficult to
know how many characters we'll get from the byte array we get from libfuzzer. Rather than reuse
WithLength
for strings which may give the impression that String.length()
will
return a value between min
and max
, we use this annotation to help make clear
that the string consists of between min
and max
UTF-8 bytes, not necessarily
(UTF-16) characters.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionDefines the scope of the annotation.int
int
-
Element Details
-
min
int min- Default:
0
-
max
int max- Default:
1000
-
constraint
String constraintDefines the scope of the annotation. Possible values are defined inPropertyConstraint
.- Default:
"JAZZER_PROPERTY_CONSTRAINT_DECLARATION"
-