-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Labels
comp-contest-estimatorIssue is related to contest estimatorIssue is related to contest estimatorcomp-minimizerIssue is related to Minimization phaseIssue is related to Minimization phasectg-bugIssue is a bugIssue is a bug
Description
Description
There are identical tests generated for io.seata.core.store.StoreMode.valueof in seata-core-0.5.0 with ContestEstimator.
To Reproduce
- Run the 'utbot' project in IntelliJ Idea 2022.2.4
- Open
utbot-junit-contest/src/main/kotlin/org/utbot/contest/ContestEstimator.kt - Change
javaHomeproperty to full local path to JDK 8 - In
fun mainchange:projectFilter = listOf("seata-core-0.5.0") - Run
fun main- make sure to set JRE in Edit Configurations to JDK 8. - When run is finished, check
utbot-junit-contest/build/output/test/seata-core-0.5.0/io/seata/core/store/StoreModeTest.java
Expected behavior
Tests are supposed to be minimized - if several tests are covering same branches, only one should be present in resulting tests class.
Actual behavior
There are three identical tests on IllegalArgumentException for io.seata.core.store.StoreMode.valueof
Trying to call enum's method valueOf with abc, ab, h - while enum values are file, db.
Visual proofs (screenshots, logs, images)
Here is the generated test class:
package io.seata.core.store;
import org.junit.Test;
public final class StoreModeTest {
///region Test suites for executable io.seata.core.store.StoreMode.valueof
///region
@Test(expected = IllegalArgumentException.class)
public void testValueof1() {
StoreMode.valueof("abc");
}
///endregion
///endregion
///region Test suites for executable io.seata.core.store.StoreMode.valueof
///region
@Test(expected = IllegalArgumentException.class)
public void testValueof2() {
StoreMode.valueof("ab");
}
///endregion
///endregion
///region Test suites for executable io.seata.core.store.StoreMode.valueof
///region
@Test(expected = IllegalArgumentException.class)
public void testValueof3() {
String string = "h";
StoreMode.valueof(string);
}
///endregion
///endregion
///region Test suites for executable io.seata.core.store.StoreMode.valueof
///region
@Test(expected = IllegalArgumentException.class)
public void testValueof4() {
StoreMode.valueof(null);
}
///endregion
///endregion
}Environment
Windows 10 Pro
IntelliJ IDEA 2022.2.4
JDK 8
Metadata
Metadata
Assignees
Labels
comp-contest-estimatorIssue is related to contest estimatorIssue is related to contest estimatorcomp-minimizerIssue is related to Minimization phaseIssue is related to Minimization phasectg-bugIssue is a bugIssue is a bug
Type
Projects
Status
Done