-
Notifications
You must be signed in to change notification settings - Fork 108
/
jvm_specific_data_filler.txt
38 lines (36 loc) · 3.95 KB
/
jvm_specific_data_filler.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<data_mapping>
Here is a markdown table showing methods that should be used to generate random data of some argument types:
| Argument types | Methods for generating random data |
| int or java.lang.Integer | FuzzedDataProvider::consumeInt() or FuzzedDataProvider::consumeInt(int, int) or FuzzedDataProvider::pickValue(int[]) |
| int[] | FuzzedDataProvider::consumeInts(int) or FuzzedDataProvider::pickValues(T[], int) or FuzzedDataProvider::pickValues(Collection<T>, int) |
| java.lang.Integer[] | new Integer[]{int...} |
| boolean or java.lang.Boolean | FuzzedDataProvider::consumeBoolean() or FuzzedDataProvider::pickValue(boolean[]) |
| boolean[] | FuzzedDataProvider::consumeBooleans(int) or FuzzedDataProvider::pickValues(T[], int) or FuzzedDataProvider::pickValues(Collection<T>, int) |
| java.lang.Boolean[] | new Boolean[]{boolean...} |
| byte or java.lang.Byte | FuzzedDataProvider::consumeByte() or FuzzedDataProvider::consumeByte(byte,byte) or FuzzedDataProvider::pickValue(byte[]) |
| byte[] | FuzzedDataProvider::consumeBytes(int) or FuzzedDataProvider::consumeRemainingAsBytes() or FuzzedDataProvider::pickValues(T[], int) or FuzzedDataProvider::pickValues(Collection<T>, int) |
| java.lang.Byte[] | new Byte[] {byte...} |
| short or java.lang.Short | FuzzedDataProvider::consumeShort() or FuzzedDataProvider::consumeShort(short, short) or FuzzedDataProvider::pickValue(short[]) |
| short[] | FuzzedDataProvider::consumeShorts(int) or FuzzedDataProvider::pickValues(T[], int) or FuzzedDataProvider::pickValues(Collection<T>, int) |
| java.lang.Short[] | new Short[] {short...} |
| long or java.lang.Long | FuzzedDataProvider::consumeLong() or FuzzedDataProvider::consumeLong(long, long) or FuzzedDataProvider::pickValue(long[]) |
| long[] | FuzzedDataProvider::consumeLongs(int) or FuzzedDataProvider::pickValues(T[], int) or FuzzedDataProvider::pickValues(Collection<T>, int) |
| java.lang.Long[] | new Long[] {long...} |
| float or java.lang.Float | FuzzedDataProvider::consumeFloat() or FuzzedDataProvider::consumeRegularFloat() or FuzzedDataProvider::consumeRegularFloat(float, float) or FuzzedDataProvider::consumeProbabilityFloat() or or FuzzedDataProvider::pickValue(float[]) |
| double or java.lang.Double | FuzzedDataProvider::consumeDouble() or FuzzedDataProvider::consumeRegularDouble() or FuzzedDataProvider::consumeRegularDouble(double, double) or FuzzedDataProvider::consumeProbabilityDouble() or FuzzedDataProvider::pickValue(double[]) |
| char or java.lang.Character | FuzzedDataProvider::consumeChar() or FuzzedDataProvider::consumeCharNoSurrogates() or FuzzedDataProvider::consumeChar(char, char) or FuzzedDataProvider::pickValue(char[]) |
| java.lang.String or java.lang.CharSequence | FuzzedDataProvider::consumeString(int) or FuzzedDataProvider::consumeAsciiString(int) or FuzzedDataProvider::consumeRemainingAsString() or FuzzedDataProvider::consumeRemainingAsAsciiString() or FuzzedDataProvider::pickValue(String[]) |
| java.lang.String[] or java.lang.CharSequence[] | FuzzedDataProvider::pickValues(T[], int) or FuzzedDataProvider::pickValues(Collection<T>, int) or new String[]{java.lang.String} |
<requirement>
<item>If the argument types are found in the first column of the above table, you must use one of the methods in the second column of the same row to create random data of that argument type.</item>
<item>Do not use any other methods to create the argument types that exist in the first column of this table.</item>
<item>
If the required arguments are instances of java.util.Collection<T> class or any of its subclass, try creating the needed class and fill it with random data with any of the methods in the above table if
the generic type of that argument is matched.
</item>
<item>
If the required argument is an array but it is not found in the first column of the above mapping table, please use the array initialisation approach and fill it with random numbers of data of the required
argument types.
</item>
</requirement>
</data_mapping>