Skip to content

Commit 792bc2d

Browse files
Avoid collecting useless models in SpringTestClassModelBuilder (#2467)
1 parent 124384f commit 792bc2d

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

utbot-framework/src/main/kotlin/org/utbot/framework/codegen/domain/models/builders/SpringTestClassModelBuilder.kt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,8 @@ class SpringTestClassModelBuilder(val context: CgContext):
110110
is UtPrimitiveModel,
111111
is UtClassRefModel,
112112
is UtVoidModel,
113-
is UtEnumConstantModel -> {}
114-
is UtCustomModel -> currentModel.origin?.let {
115-
collectRecursively(it.wrap(currentModelWrapper.modelTagName), allModels)
116-
}
113+
is UtEnumConstantModel,
114+
is UtCustomModel-> {}
117115
is UtLambdaModel -> {
118116
currentModel.capturedValues.forEach { collectRecursively(it.wrap(), allModels) }
119117
}
@@ -134,8 +132,6 @@ class SpringTestClassModelBuilder(val context: CgContext):
134132
}
135133
}
136134
is UtAssembleModel -> {
137-
currentModel.origin?.let { collectRecursively(it.wrap(), allModels) }
138-
139135
currentModel.instantiationCall.instance?.let { collectRecursively(it.wrap(), allModels) }
140136
currentModel.instantiationCall.params.forEach { collectRecursively(it.wrap(), allModels) }
141137

0 commit comments

Comments
 (0)