Class MutableStringRegressionTest
java.lang.Object
it.unimi.dsi.test.MutableStringRegressionTest
A class for torture-testing
MutableStrings.- Since:
- 0.3
- Author:
- Paolo Boldi, Sebastiano Vigna
-
Method Summary
Modifier and TypeMethodDescriptionstatic Object[]Given an array of Objects, it converts their types usingalternativeParameterTypearray, unless the latter isnull, in which case it just returns a copy of the argument.static ObjectConverts Objectofrom classc1to classc2.static char[]Generates a char[] at random.static char[]generateCharArray(int m) Generates a char[] at random with given its maximum length.static MutableStringGenerates a MutableString at random.static StringGenerates a String at random.static StringBufferGenerates a StringBuffer at random.static char[]generateUnicodeCharArray(int n) Generates a char[] at random.static voidstatic Object[]Generate and return an array of Objects at random suitable for method m.static MethodExtract a method at random that belongs to both classes.static voidspecialTest(StringBuffer sb, MutableString ms) Special tests...static voidtest(StringBuffer sb, MutableString ms) Tests a method at random onsbandms.static voidtestIO(int n) Tests I/O methods.
-
Method Details
-
randomMethod
Extract a method at random that belongs to both classes. SetsmsIdx,sbIdx. -
params
-
generateCharArray
public static char[] generateCharArray()Generates a char[] at random. -
generateCharArray
public static char[] generateCharArray(int m) Generates a char[] at random with given its maximum length. -
generateUnicodeCharArray
public static char[] generateUnicodeCharArray(int n) Generates a char[] at random. -
generateString
Generates a String at random. -
generateStringBuffer
Generates a StringBuffer at random. -
generateMutableString
Generates a MutableString at random. -
convert
-
convert
-
specialTest
Special tests... -
testIO
-
test
public static void test(StringBuffer sb, MutableString ms) throws IllegalArgumentException, IllegalAccessException Tests a method at random onsbandms. -
main
public static void main(String[] arg) throws IllegalArgumentException, IllegalAccessException, IOException
-