Skip to content

Commit 8d09ba6

Browse files
committed
Revert "Hack for Random mocks (#2702)"
This reverts commit 4fa518e.
1 parent 4fa518e commit 8d09ba6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

utbot-junit-contest/src/main/kotlin/org/utbot/contest/usvm/jc/JcTestExecutor.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,10 @@ class JcTestExecutor(
149149
override fun allocateString(value: UTestExpression): UTestExpression = value
150150

151151
override fun resolveObject(ref: UConcreteHeapRef, heapRef: UHeapRef, type: JcClassType): UTestExpression {
152-
if (ref !in resolvedMethodMocks || type.jcClass.name != "java.util.Random") {
152+
if (ref !in resolvedMethodMocks) {
153153
return super.resolveObject(ref, heapRef, type)
154154
}
155155

156-
// Hack: mock only Random
157-
158156
val mocks = resolvedMethodMocks.getValue(ref)
159157

160158
val fieldValues = mutableMapOf<JcField, UTestExpression>()

0 commit comments

Comments
 (0)