Add fuzzer for map generator testing
Adds a fuzzer that iterates through map generation settings combinations to either discover crashes or measure the frequency of rejected maps. All generated maps are in-memory only and discarded immediately after generation. Running the fuzzer on anything other than a small combination of settings is time expensive. It is added only as a utility for manual invocation and is not integrated into the regular set of tests.
This commit is contained in:
committed by
Gustas Kažukauskas
parent
c6d5a1a182
commit
611ac8ce54
@@ -296,6 +296,23 @@ namespace OpenRA.Mods.Common.MapGenerator
|
||||
return Default;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsFreeform()
|
||||
{
|
||||
switch (Ui)
|
||||
{
|
||||
case UiType.Hidden:
|
||||
case UiType.DropDown:
|
||||
case UiType.Checkbox:
|
||||
return false;
|
||||
case UiType.Integer:
|
||||
case UiType.Float:
|
||||
case UiType.String:
|
||||
return true;
|
||||
default:
|
||||
throw new InvalidOperationException("Bad UiType");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public readonly IReadOnlyList<Option> Options;
|
||||
|
||||
Reference in New Issue
Block a user