Skip to content

Test Failure  #191

Open
Open
@SoodehAtefi

Description

Hi,
I have generated new test suites for Mallet using Evosuite but when I am running the tests I have this failure.

testcase name="test54" classname="cc.mallet.fst.Segment_ESTest" time="0.002"
failure message="Expecting exception: IndexOutOfBoundsException" type="java.lang.AssertionError" CDATA[java.lang.AssertionError: Expecting exception: IndexOutOfBoundsException
at org.junit.Assert.fail(Assert.java:89)
at cc.mallet.fst.Segment_ESTest.test54(Segment_ESTest.java:1036)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:288)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:282)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:748)

And this is the test:
@test(timeout = 4000)
public void test54() throws Throwable {
Object[] objectArray0 = new Object[6];
Object object0 = new Object();
objectArray0[0] = object0;
objectArray0[1] = object0;
objectArray0[2] = object0;
objectArray0[3] = object0;
objectArray0[4] = objectArray0[1];
objectArray0[5] = object0;
Alphabet alphabet0 = new Alphabet(objectArray0);
FeatureSequence featureSequence0 = new FeatureSequence(alphabet0, 0);
Segment segment0 = new Segment(featureSequence0, featureSequence0, featureSequence0, 0, 0, objectArray0[3], objectArray0[3]);
TokenSequence tokenSequence0 = new TokenSequence(0);
segment0.setPredicted(tokenSequence0);
// Undeclared exception!
try {
segment0.equals(segment0);
fail("Expecting exception: IndexOutOfBoundsException");
} catch(IndexOutOfBoundsException e) {
//
// Index: 0, Size: 0
//
verifyException("java.util.ArrayList", e);
}
}

Thanks.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions