Skip to content

Commit e2a074a

Browse files
committed
Move useCustomJavaDocTags to UtSettings, make useFuzzing true
1 parent a030362 commit e2a074a

File tree

5 files changed

+11
-12
lines changed

5 files changed

+11
-12
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.
@@ -269,7 +274,7 @@ object UtSettings {
269274
/**
270275
* Set to true to start fuzzing if symbolic execution haven't return anything
271276
*/
272-
var useFuzzing: Boolean by getBooleanProperty(false)
277+
var useFuzzing: Boolean by getBooleanProperty(true)
273278

274279
/**
275280
* 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
@@ -97,7 +97,6 @@ abstract class UtValueTestCaseChecker(
9797
UtSettings.useAssembleModelGenerator = true
9898
UtSettings.saveRemainingStatesForConcreteExecution = false
9999
UtSettings.useFuzzing = false
100-
UtSummarySettings.USE_CUSTOM_JAVADOC_TAGS = false
101100
}
102101

103102
// 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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ class Summarization(val sourceFile: File?, val invokeDescriptions: List<InvokeDe
157157
}
158158

159159
for (traceTags in clusterTraceTags.traceTags) {
160-
if (GENERATE_COMMENTS && USE_CUSTOM_JAVADOC_TAGS) {
160+
if (GENERATE_COMMENTS && UtSettings.useCustomJavaDocTags) {
161161
traceTags.execution.summary =
162162
CustomJavaDocCommentBuilder(traceTags, sootToAST).buildDocStatements(methodUnderTest)
163163
} 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)