File tree Expand file tree Collapse file tree 2 files changed +2
-11
lines changed
utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/constructor Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ import org.utbot.framework.codegen.model.constructor.util.CgComponents
18
18
import org.utbot.framework.codegen.model.constructor.util.classCgClassId
19
19
import org.utbot.framework.codegen.model.constructor.util.getAmbiguousOverloadsOf
20
20
import org.utbot.framework.codegen.model.constructor.util.importIfNeeded
21
- import org.utbot.framework.codegen.model.constructor.util.isTestClassUtil
22
21
import org.utbot.framework.codegen.model.constructor.util.isUtil
23
22
import org.utbot.framework.codegen.model.constructor.util.typeCast
24
23
import org.utbot.framework.codegen.model.tree.CgAllocateArray
@@ -107,7 +106,7 @@ internal class CgCallableAccessManagerImpl(val context: CgContext) : CgCallableA
107
106
}
108
107
109
108
private fun newMethodCall (methodId : MethodId ) {
110
- if (isTestClassUtil (methodId)) requiredUtilMethods + = methodId
109
+ if (isUtil (methodId)) requiredUtilMethods + = methodId
111
110
importIfNeeded(methodId)
112
111
113
112
// Builtin methods does not have jClass, so [methodId.method] will crash on it,
@@ -226,7 +225,7 @@ internal class CgCallableAccessManagerImpl(val context: CgContext) : CgCallableA
226
225
* @return true if a method can be called with the given arguments without reflection
227
226
*/
228
227
private fun MethodId.canBeCalledWith (caller : CgExpression ? , args : List <CgExpression >): Boolean =
229
- (isTestClassUtil (this ) || isAccessibleFrom(testClassPackageName))
228
+ (isUtil (this ) || isAccessibleFrom(testClassPackageName))
230
229
&& caller canBeReceiverOf this
231
230
&& args canBeArgsOf this
232
231
Original file line number Diff line number Diff line change @@ -45,7 +45,6 @@ import org.utbot.framework.plugin.api.UtNullModel
45
45
import org.utbot.framework.plugin.api.UtPrimitiveModel
46
46
import org.utbot.framework.plugin.api.WildcardTypeParameter
47
47
import org.utbot.framework.plugin.api.util.arrayLikeName
48
- import org.utbot.framework.codegen.model.constructor.builtin.TestClassUtilMethodProvider
49
48
50
49
internal data class EnvironmentFieldStateCache (
51
50
val thisInstance : FieldStateCache ,
@@ -130,13 +129,6 @@ internal fun CgContextOwner.isUtil(method: MethodId): Boolean {
130
129
return method in utilMethodProvider.utilMethodIds
131
130
}
132
131
133
- /* *
134
- * Check if a method is an util method that is declared in the test class (not taken from the codegen utils library)
135
- */
136
- internal fun CgContextOwner.isTestClassUtil (method : MethodId ): Boolean {
137
- return utilMethodProvider is TestClassUtilMethodProvider && isUtil(method)
138
- }
139
-
140
132
val classCgClassId = CgClassId (Class ::class .id, typeParameters = WildcardTypeParameter (), isNullable = false )
141
133
142
134
internal fun getStaticFieldVariableName (owner : ClassId , path : FieldPath ): String {
You can’t perform that action at this time.
0 commit comments