Open alisevych opened 1 year ago
Description
Internal utbot exception OverflowDetectionError is verified in generated test
OverflowDetectionError
To Reproduce
utbot
Heap
Parameterized tests
Do not mock
Expected behavior
Generated tests should compile successfully. No internal utbot exceptions are expected to be used in generated tests.
Actual behavior
org.utbot.framework.plugin.api.OverflowDetectionError.class is checked as expectedError in the test.
org.utbot.framework.plugin.api.OverflowDetectionError.class
Screenshots, logs
@ParameterizedTest @MethodSource("org.utbot.examples.structures.HeapTest#provideDataForPush") public void parameterizedTestsForPush(Heap heap, long key, Class expectedError) { try { heap.push(key); } catch (java.lang.Throwable throwable) { assertTrue(expectedError.isInstance(throwable)); } } public static java.util.ArrayList provideDataForPush() { ArrayList argList = new ArrayList(); { Heap heap = new Heap(); java.lang.Object[] testCaseObjects = new java.lang.Object[3]; testCaseObjects[0] = heap; testCaseObjects[1] = Integer.MIN_VALUE; testCaseObjects[2] = org.utbot.framework.plugin.api.OverflowDetectionError.class; argList.add(arguments(testCaseObjects)); } }
Environment
IntelliJ IDEA version - Ultimate 2023.2 Project - gradle JDK - 17
Additional context
Description
Internal utbot exception
OverflowDetectionError
is verified in generated testTo Reproduce
utbot
projectHeap
withParameterized tests
andDo not mock
selectedExpected behavior
Generated tests should compile successfully. No internal utbot exceptions are expected to be used in generated tests.
Actual behavior
org.utbot.framework.plugin.api.OverflowDetectionError.class
is checked as expectedError in the test.Screenshots, logs
Environment
IntelliJ IDEA version - Ultimate 2023.2 Project - gradle JDK - 17
Additional context