Skip to content

Commit dc010f6

Browse files
author
Ivan Volkov
committed
renamed isSyntheticMethod to isKnownSyntheticMethod
1 parent efea2e1 commit dc010f6

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

utbot-cli/src/main/kotlin/org/utbot/cli/GenerateTestsCommand.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import kotlin.reflect.KClass
2323
import mu.KotlinLogging
2424
import org.utbot.common.filterWhen
2525
import org.utbot.framework.UtSettings
26-
import org.utbot.framework.util.isSyntheticMethod
26+
import org.utbot.framework.util.isKnownSyntheticMethod
2727

2828

2929
private val logger = KotlinLogging.logger {}
@@ -95,7 +95,7 @@ class GenerateTestsCommand :
9595

9696
val classUnderTest: KClass<*> = loadClassBySpecifiedFqn(targetClassFqn)
9797
val targetMethods = classUnderTest.targetMethods()
98-
.filterWhen(UtSettings.skipTestGenerationForSyntheticMethods) { !isSyntheticMethod(it) }
98+
.filterWhen(UtSettings.skipTestGenerationForSyntheticMethods) { !isKnownSyntheticMethod(it) }
9999
initializeEngine(workingDirectory)
100100

101101
if (targetMethods.isEmpty()) {

utbot-framework/src/main/kotlin/org/utbot/framework/util/SyntheticMethods.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package org.utbot.framework.util
33
import org.utbot.engine.displayName
44
import org.utbot.framework.plugin.api.UtMethod
55

6-
fun isSyntheticMethod(method: UtMethod<*>): Boolean =
6+
fun isKnownSyntheticMethod(method: UtMethod<*>): Boolean =
77
if (method.clazz.java.isEnum)
88
method.displayName.substringBefore('(') in KnownSyntheticMethodNames.enumSyntheticMethodNames
99
else

utbot-junit-contest/src/main/kotlin/org/utbot/contest/Contest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ import kotlinx.coroutines.yield
6767
import mu.KotlinLogging
6868
import org.apache.commons.io.FileUtils
6969
import org.utbot.common.filterWhen
70-
import org.utbot.framework.util.isSyntheticMethod
70+
import org.utbot.framework.util.isKnownSyntheticMethod
7171

7272
internal const val junitVersion = 4
7373
private val logger = KotlinLogging.logger {}
@@ -472,7 +472,7 @@ private fun prepareClass(kotlinClass: KClass<*>, methodNameFilter: String?): Lis
472472
.map { UtMethod(it.first, kotlinClass) }
473473
.filter { methodNameFilter?.equals(it.callable.name) ?: true }
474474
.filterNot { it.isConstructor && (it.clazz.isAbstract || it.clazz.java.isEnum) }
475-
.filterWhen(UtSettings.skipTestGenerationForSyntheticMethods) { !isSyntheticMethod(it) }
475+
.filterWhen(UtSettings.skipTestGenerationForSyntheticMethods) { !isKnownSyntheticMethod(it) }
476476
.toList()
477477

478478
return if (kotlinClass.nestedClasses.isEmpty()) {

0 commit comments

Comments
 (0)