Skip to content

Commit 5f60f41

Browse files
committed
Move useCustomJavaDocTags to UtSettings, make useFuzzing true
1 parent 756cb5c commit 5f60f41

File tree

5 files changed

+11
-13
lines changed

5 files changed

+11
-13
lines changed

utbot-framework-api/src/main/kotlin/org/utbot/framework/UtSettings.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,11 @@ object UtSettings {
183183
var testName by getBooleanProperty(true)
184184
var testDisplayName by getBooleanProperty(true)
185185

186+
/**
187+
* Generate summaries using plugin's custom JavaDoc tags.
188+
*/
189+
var useCustomJavaDocTags by getBooleanProperty(false)
190+
186191
/**
187192
* Enable the machine learning module to generate summaries for methods under test.
188193
* True by default.
@@ -271,7 +276,7 @@ object UtSettings {
271276
/**
272277
* Set to true to start fuzzing if symbolic execution haven't return anything
273278
*/
274-
var useFuzzing: Boolean by getBooleanProperty(false)
279+
var useFuzzing: Boolean by getBooleanProperty(true)
275280

276281
/**
277282
* Set the total attempts to improve coverage by fuzzer.

utbot-framework/src/test/kotlin/org/utbot/examples/UtValueTestCaseChecker.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ abstract class UtValueTestCaseChecker(
9393
UtSettings.useAssembleModelGenerator = true
9494
UtSettings.saveRemainingStatesForConcreteExecution = false
9595
UtSettings.useFuzzing = false
96-
UtSummarySettings.USE_CUSTOM_JAVADOC_TAGS = false
9796
}
9897

9998
// checks paramsBefore and result

utbot-summary-tests/src/test/kotlin/examples/CustomJavaDocTagsEnabler.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,17 @@ package examples
33
import org.junit.jupiter.api.extension.AfterEachCallback
44
import org.junit.jupiter.api.extension.BeforeEachCallback
55
import org.junit.jupiter.api.extension.ExtensionContext
6-
import org.utbot.summary.UtSummarySettings
6+
import org.utbot.framework.UtSettings
77

88
class CustomJavaDocTagsEnabler(private val enable: Boolean = true) : BeforeEachCallback, AfterEachCallback {
99
private var previousValue = false
1010

1111
override fun beforeEach(context: ExtensionContext?) {
12-
previousValue = UtSummarySettings.USE_CUSTOM_JAVADOC_TAGS
13-
UtSummarySettings.USE_CUSTOM_JAVADOC_TAGS = enable
12+
previousValue = UtSettings.useCustomJavaDocTags
13+
UtSettings.useCustomJavaDocTags = enable
1414
}
1515

1616
override fun afterEach(context: ExtensionContext?) {
17-
UtSummarySettings.USE_CUSTOM_JAVADOC_TAGS = previousValue
17+
UtSettings.useCustomJavaDocTags = previousValue
1818
}
1919
}

utbot-summary/src/main/kotlin/org/utbot/summary/Summarization.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import java.io.File
2424
import java.nio.file.Path
2525
import java.nio.file.Paths
2626
import mu.KotlinLogging
27-
import org.utbot.summary.UtSummarySettings.USE_CUSTOM_JAVADOC_TAGS
2827
import org.utbot.summary.comment.CustomJavaDocCommentBuilder
2928
import soot.SootMethod
3029

@@ -145,7 +144,7 @@ class Summarization(val sourceFile: File?, val invokeDescriptions: List<InvokeDe
145144
}
146145

147146
for (traceTags in clusterTraceTags.traceTags) {
148-
if (GENERATE_COMMENTS && USE_CUSTOM_JAVADOC_TAGS) {
147+
if (GENERATE_COMMENTS && UtSettings.useCustomJavaDocTags) {
149148
traceTags.execution.summary =
150149
CustomJavaDocCommentBuilder(traceTags, sootToAST).buildDocStatements(methodUnderTest)
151150
} else if (GENERATE_COMMENTS) {

utbot-summary/src/main/kotlin/org/utbot/summary/UtSummarySettings.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,6 @@ object UtSummarySettings {
1111
*/
1212
var GENERATE_CLUSTER_COMMENTS = true
1313

14-
/**
15-
* Generate summaries using plugin's custom JavaDoc tags.
16-
*/
17-
var USE_CUSTOM_JAVADOC_TAGS = true
18-
1914
/**
2015
* If True names for tests will be generated
2116
*/

0 commit comments

Comments
 (0)