File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
utbot-junit-contest/src/main/kotlin/org/utbot/contest/usvm Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import org.usvm.instrumentation.testcase.descriptor.UTestExceptionDescriptor
1111import org.usvm.instrumentation.testcase.descriptor.UTestObjectDescriptor
1212import org.usvm.instrumentation.testcase.descriptor.UTestRefDescriptor
1313import org.usvm.instrumentation.testcase.descriptor.UTestValueDescriptor
14+ import org.usvm.instrumentation.util.InstrumentationModuleConstants.nameForExistingButNullString
1415import org.utbot.framework.plugin.api.FieldId
1516import org.utbot.framework.plugin.api.UtArrayModel
1617import org.utbot.framework.plugin.api.UtClassRefModel
@@ -112,7 +113,7 @@ class JcToUtModelConverter(
112113 is UTestConstantDescriptor .Int -> UtPrimitiveModel (valueDescriptor.value)
113114 is UTestConstantDescriptor .Long -> UtPrimitiveModel (valueDescriptor.value)
114115 is UTestConstantDescriptor .Short -> UtPrimitiveModel (valueDescriptor.value)
115- is UTestConstantDescriptor .String -> UtPrimitiveModel (valueDescriptor.value)
116+ is UTestConstantDescriptor .String -> constructString (valueDescriptor.value)
116117
117118 is UTestCyclicReferenceDescriptor -> descriptorToModelCache.getValue(
118119 refIdToDescriptorCache.getValue(valueDescriptor.refId)
@@ -156,4 +157,11 @@ class JcToUtModelConverter(
156157 return model
157158 }
158159
160+ private fun constructString (valueDescriptorValue : String ): UtModel {
161+ if (valueDescriptorValue == nameForExistingButNullString){
162+ return UtNullModel (stringClassId)
163+ }
164+ return UtPrimitiveModel (valueDescriptorValue)
165+ }
166+
159167}
You can’t perform that action at this time.
0 commit comments