You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Randoop generated tests for snippets in L2 where the test code just creates complex strings, but does not call the snippet method.
For example, this is the code for one of the tests:
byte[] byte_array0 = newbyte[] { };
// The following exception was thrown during execution in test generationtry {
java.lang.Stringstr4 = newjava.lang.String(byte_array0, 100, 100, "");
org.junit.Assert.fail("Expected exception of type java.lang.StringIndexOutOfBoundsException");
} catch (java.lang.StringIndexOutOfBoundsExceptione) {
// Expected exception.if (! e.getClass().getCanonicalName().equals("java.lang.StringIndexOutOfBoundsException")) {
org.junit.Assert.fail("Expected exception of type java.lang.StringIndexOutOfBoundsException, got " + e.getClass().getCanonicalName());
}
}
// Regression assertion (captures the current behavior of the code)org.junit.Assert.assertNotNull(byte_array0);
Randoop has a parameter to handle this:
--include-if-classname-appears=regex. Classes, one of which every test must use. Randoop will only output tests that have at least one use of a member of a class whose name matches the regular expression.
Add this parameter to Randoop runner to filter out these tests.
The text was updated successfully, but these errors were encountered:
Randoop generated tests for snippets in L2 where the test code just creates complex strings, but does not call the snippet method.
For example, this is the code for one of the tests:
Randoop has a parameter to handle this:
Add this parameter to Randoop runner to filter out these tests.
The text was updated successfully, but these errors were encountered: