Skip to content

Commit b2bbec1

Browse files
committed
chore: print mutators debug strings in selffuzz test
The new format is: - fuzzGenericClass(List) -> Arguments[List<List<Integer>[]>] It is especially useful to see the mutator when debugging or trying out new mutators with @Solo.
1 parent b15372a commit b2bbec1

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

selffuzz/src/test/java/com/code_intelligence/selffuzz/mutation/ArgumentsMutatorFuzzTest.java

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,17 @@ public class ArgumentsMutatorFuzzTest {
5757

5858
static {
5959
System.out.println("Found " + methods.size() + " @SelfFuzzTest methods.");
60-
for (Method method : methods) {
61-
System.out.println(" - " + method);
60+
for (int i = 0; i < methods.size(); i++) {
61+
System.out.print(" - " + methods.get(i).getName() + "(");
62+
Class<?>[] paramTypes = methods.get(i).getParameterTypes();
63+
for (int j = 0; j < paramTypes.length; j++) {
64+
System.out.print(paramTypes[j].getSimpleName());
65+
if (j < paramTypes.length - 1) {
66+
System.out.print(", ");
67+
}
68+
}
69+
System.out.println(")");
70+
System.out.println(" -> " + mutators.get(i));
6271
}
6372
assertThat(methods).isNotEmpty();
6473
}

0 commit comments

Comments
 (0)