Open
Description
Description
Seems like the problem with the engine.
To Reproduce
Steps to reproduce the behavior:
- Set the following settings for the estimator:
timeLimit = 160
methodFilter = "com.google.common.base.CaseFormat.*"
projectFilter = listOf("guava-26.0")
- Find testDoForward generated test.
Expected behavior
Correct assertion types. Passing assertions.
Actual behavior
Assertion for false fails (the last statement):
@Test
public void testDoForward() throws Exception {
Object stringConverter = createInstance("com.google.common.base.CaseFormat$StringConverter");
CaseFormat anonymousCaseFormat = ((CaseFormat) createInstance("com.google.common.base.CaseFormat$4"));
setField(stringConverter, "com.google.common.base.CaseFormat$StringConverter", "sourceFormat", anonymousCaseFormat);
setField(stringConverter, "com.google.common.base.CaseFormat$StringConverter", "targetFormat", anonymousCaseFormat);
String string = "";
CaseFormat initialStringConverterSourceFormat = ((CaseFormat) getFieldValue(stringConverter, "com.google.common.base.CaseFormat$StringConverter", "sourceFormat"));
Class stringConverterClazz = Class.forName("com.google.common.base.CaseFormat$StringConverter");
Class stringType = Class.forName("java.lang.String");
Method doForwardMethod = stringConverterClazz.getDeclaredMethod("doForward", stringType);
doForwardMethod.setAccessible(true);
java.lang.Object[] doForwardMethodArguments = new java.lang.Object[1];
doForwardMethodArguments[0] = string;
String actual = ((String) doForwardMethod.invoke(stringConverter, doForwardMethodArguments));
assertEquals(string, actual);
CaseFormat finalStringConverterSourceFormat = ((CaseFormat) getFieldValue(stringConverter, "com.google.common.base.CaseFormat$StringConverter", "sourceFormat"));
assertFalse(initialStringConverterSourceFormat == finalStringConverterSourceFormat);
}
Metadata
Metadata
Assignees
Type
Projects
Status
Todo