Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
1175678
squash constraint model synthesis
AbdullinAM Sep 28, 2022
d69ebc4
squash constraint model synthesis
AbdullinAM Sep 28, 2022
8d68488
resolver fix
AbdullinAM Sep 29, 2022
c6cac8d
model based post condition constructor restored
AbdullinAM Sep 29, 2022
df75f26
very primitive global timeoutfor synthesis
AbdullinAM Oct 11, 2022
e10a50e
Primitive Stream wrappers (no laziness and source mutations support) …
Damtev Sep 28, 2022
80da28b
Avoid summary duplication #985 (#1015)
onewhl Sep 28, 2022
608d56c
Fix bug in filtering Kotlin getters/setters in plugin (#1026)
volivan239 Sep 28, 2022
1f59106
Reordered the test clusters (#991)
amandelpie Sep 30, 2022
f96c118
Fix build directory for classes from Kotlin files (#1019)
volivan239 Sep 30, 2022
40bf31b
Improve choosing between simpleName and canonicalName in rendered cod…
EgorkaKulikov Sep 30, 2022
3380506
Run tests on `push` into release branches (#1045)
viktoriia-fomina Sep 30, 2022
234ace0
Fix utbot-maven compilation (#1049)
dtim Oct 1, 2022
1a0289d
Support AssertionError in SARIF report (#1032)
mmvpm Oct 3, 2022
7b417c9
Render links in the invokes part of JavaDocs (#1051)
onewhl Oct 3, 2022
0cedf7a
Improve fuzzer recursive model providers (#1039)
Markoutte Oct 3, 2022
4293d4f
IndexNotReadyException thrown in IDEA with installed UnitTestBot plug…
Vassiliy-Kudryashov Oct 3, 2022
a5d628c
Publish without workflow run number (#1053)
viktoriia-fomina Oct 3, 2022
ba08cb7
Modificators processing in AssembleModelGenerator and UtBotFieldModif…
EgorkaKulikov Oct 3, 2022
ae5b883
Gradle cache usage added #974 (#998)
bissquit Oct 4, 2022
b6d8a65
Try to fix memory leak in CgComponents (#1057)
EgorkaKulikov Oct 4, 2022
77194a3
Repeating SourceFolder fix (#1073)
Domonion Oct 4, 2022
0ff62da
Include information about triggered recursion to Javadocs (#1084)
onewhl Oct 4, 2022
e5d8b5f
Fix rendering for different IDE versions (#1087)
onewhl Oct 4, 2022
8016349
Fixed unavailable mock classes (#1066)
Damtev Oct 5, 2022
f55c96d
Engine process #2 (#1067)
Domonion Oct 5, 2022
f3af058
Remove unsat states from invokes (#1071)
CaelmBleidd Oct 5, 2022
e298169
Settings revision, 2nd iteration #977 (#1088)
Vassiliy-Kudryashov Oct 5, 2022
5a690b9
Fix soot initialization (#1090)
sergeypospelov Oct 5, 2022
cd3dcd1
Improve verification that static mocking is configured (#1091)
EgorkaKulikov Oct 5, 2022
b067af9
Fix assertions (#1096)
SBOne-Kenobi Oct 5, 2022
43efb96
Cancel test generation if compilation was not successful #1100 (#1103)
volivan239 Oct 5, 2022
bf272b6
Vassiliy kudryashov/1021 plugin support idea 20222 new (#1094)
Vassiliy-Kudryashov Oct 5, 2022
fc61391
Wrap method reference into @link tag only if the invoked method is no…
onewhl Oct 6, 2022
4ce788d
Notify and reason to the user that UtBot can't be run on the class in…
EgorkaKulikov Oct 6, 2022
0abc48b
Make snapshot version calendar-dependant (#1108)
Vassiliy-Kudryashov Oct 6, 2022
a215477
We create temporary files a lot, we have to clean it either (#1089)
Vassiliy-Kudryashov Oct 7, 2022
8280807
Get PsiClass' package by declaration in containingFile and not by its…
volivan239 Oct 7, 2022
8fb3938
Out of process bug fixes (#1109)
Domonion Oct 7, 2022
5fb1e16
Plugin setting to choose Kotlin generation doesn't work #1075 (#1110)
Vassiliy-Kudryashov Oct 7, 2022
ad150ba
Lessen thisInstance creation in parameterized test generation (#1065)
sofurihafe Oct 7, 2022
2f03687
Fix settings persistence: we save IDs, thus we should parse IDs inste…
Vassiliy-Kudryashov Oct 7, 2022
15bdfa8
Support Android Studio in utbot-intellij (#1121)
EgorkaKulikov Oct 10, 2022
166b393
Select Kotlin test src root by default when generating for Kotlin #94…
volivan239 Oct 10, 2022
c7618bb
Filter generated sources in Android Studio projects #692 (#1123)
EgorkaKulikov Oct 10, 2022
5479449
Exclude mocking javax (#1124)
SBOne-Kenobi Oct 10, 2022
06c548e
Linux engine process fix (#1126)
Domonion Oct 10, 2022
7e71d75
Android Studio troubleshooting related to Lombok improved (#1131)
EgorkaKulikov Oct 11, 2022
1a18c53
Other class is not mocked as required #747 (#1033)
Markoutte Oct 11, 2022
d1bea97
Add parameterized test generation in CI (#1114)
sofurihafe Oct 11, 2022
5181cef
Fix static mocking (#1142)
SBOne-Kenobi Oct 12, 2022
4706d1b
Added simple custom JavaDocs for the tests produced by Fuzzer (#1069)
amandelpie Oct 12, 2022
d36b988
Concrete execution fails for a static method using a static field #71…
Markoutte Oct 12, 2022
a55999d
Field assertions fixes (#920)
Damtev Oct 12, 2022
529c10d
Fix dump mode fail (#1146)
Domonion Oct 13, 2022
4470ea8
Refactor Sarif reports (#1152)
mmvpm Oct 13, 2022
d4cb666
Publish plugin and CLI for minor release (#1155)
viktoriia-fomina Oct 14, 2022
cad8133
Fixing long summarization timeouts & mics (#1151)
Domonion Oct 14, 2022
724b794
squash constraint model synthesis
AbdullinAM Sep 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Modificators processing in AssembleModelGenerator and UtBotFieldModif…
…icatorsSearcher corrected (#1029)

* Improve modificators analysis in UtBotFieldModificatorsSearcher and AssembleModelGenerator

* Apply review comments

* Fixed test

* One more correction for package names
  • Loading branch information
EgorkaKulikov authored and AbdullinAM committed Oct 17, 2022
commit ba08cb7584392fb869b83e2c4c7e6d0ac2e8fcb2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.utbot.examples.assemble.arrays;
package org.utbot.examples.assemble;

/**
* A class with array of objects that are arrays of complex fields themselves.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.utbot.examples.assemble.arrays;
package org.utbot.examples.assemble;

/**
* A class with a two-dimensional array field.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.utbot.examples.assemble.arrays;
package org.utbot.examples.assemble;

/**
* A class with an array with a default value.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.utbot.examples.assemble.arrays;
package org.utbot.examples.assemble;

import org.utbot.examples.assemble.PrimitiveFields;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.utbot.examples.assemble.constructors;
package org.utbot.examples.assemble;

/**
* A class without default constructor and with complex one.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.utbot.examples.assemble.constructors;
package org.utbot.examples.assemble;

/**
* A class without default constructor and with complex one,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.utbot.examples.assemble.constructors;
package org.utbot.examples.assemble;

public class ConstructorModifyingStatic {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.utbot.examples.assemble.defaults;
package org.utbot.examples.assemble;

/**
* A class with a field with default value that is not a default value of type.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package org.utbot.examples.assemble.defaults;
package org.utbot.examples.assemble;

public class DefaultFieldModifiedInConstructor {
int z;
public int z;

@SuppressWarnings("Unused")
DefaultFieldModifiedInConstructor(int z_) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.utbot.examples.assemble.defaults;
package org.utbot.examples.assemble;

/**
* A class with a field with default value that is not a default value of type.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.utbot.examples.assemble.defaults;
package org.utbot.examples.assemble;

/**
* A class with a field with setter default value that is not a default value of type.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package org.utbot.examples.assemble;

/**
* Need to be located at the same package as [AssembleTestUtils]
* because requires a setter for package-private field.
*/
public class DefaultPackagePrivateField {
int z = 10;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.utbot.examples.assemble.constructors;
package org.utbot.examples.assemble;

/**
* A class with a primitive constructor that inherits a complex constructor.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.utbot.examples.assemble.constructors;
package org.utbot.examples.assemble;

/**
* A class with a primitive constructor that inherits another primitive constructor.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.utbot.examples.assemble.arrays;
package org.utbot.examples.assemble;

/**
* A class with an array with elements of primitive type.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.utbot.examples.assemble.constructors;
package org.utbot.examples.assemble;

/**
* A class without default constructor and with primitive one.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.utbot.examples.assemble.constructors;
package org.utbot.examples.assemble;

/**
* A class without default constructor and with another one with default field
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.utbot.examples.assemble.constructors;
package org.utbot.examples.assemble;

/**
* A class with private constructor.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.utbot.examples.assemble.constructors;
package org.utbot.examples.assemble;

/**
* A class with a constructor that seems to be complex
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.utbot.examples.assemble.statics;
package org.utbot.examples.assemble;

/**
* A class with primitive constructor and static field
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.utbot.examples.assemble.arrays;
package org.utbot.examples.assemble.another;

/**
* A test class with fake method under test.
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.utbot.examples.manual.examples;

import org.utbot.examples.assemble.arrays.ArrayOfComplexArrays;
import org.utbot.examples.assemble.ArrayOfComplexArrays;

public class ArrayOfComplexArraysExample {
public int getValue(ArrayOfComplexArrays a) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.utbot.examples.manual.examples;

import org.utbot.examples.assemble.arrays.ArrayOfPrimitiveArrays;
import org.utbot.examples.assemble.ArrayOfPrimitiveArrays;

public class ArrayOfPrimitiveArraysExample {
int assign10(ArrayOfPrimitiveArrays a) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.utbot.examples.manual.examples;

import org.utbot.examples.assemble.arrays.AssignedArray;
import org.utbot.examples.assemble.AssignedArray;

public class AssignedArrayExample {
public void foo(AssignedArray aa) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
import org.utbot.common.PathUtil;
import org.utbot.examples.assemble.DirectAccess;
import org.utbot.examples.assemble.PrimitiveFields;
import org.utbot.examples.assemble.arrays.ArrayOfComplexArrays;
import org.utbot.examples.assemble.arrays.ArrayOfPrimitiveArrays;
import org.utbot.examples.assemble.arrays.AssignedArray;
import org.utbot.examples.assemble.arrays.ComplexArray;
import org.utbot.examples.assemble.ArrayOfComplexArrays;
import org.utbot.examples.assemble.ArrayOfPrimitiveArrays;
import org.utbot.examples.assemble.AssignedArray;
import org.utbot.examples.assemble.ComplexArray;
import org.utbot.examples.manual.examples.*;
import org.utbot.examples.manual.examples.customer.B;
import org.utbot.examples.manual.examples.customer.C;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@ import org.utbot.examples.assemble.ListItem
import org.utbot.examples.assemble.NoModifier
import org.utbot.examples.assemble.PackagePrivateFields
import org.utbot.examples.assemble.PrimitiveFields
import org.utbot.examples.assemble.arrays.ArrayOfComplexArrays
import org.utbot.examples.assemble.arrays.ArrayOfPrimitiveArrays
import org.utbot.examples.assemble.arrays.AssignedArray
import org.utbot.examples.assemble.arrays.ComplexArray
import org.utbot.examples.assemble.arrays.MethodUnderTest
import org.utbot.examples.assemble.arrays.PrimitiveArray
import org.utbot.examples.assemble.constructors.ComplexConstructor
import org.utbot.examples.assemble.constructors.ComplexConstructorWithSetter
import org.utbot.examples.assemble.constructors.ConstructorModifyingStatic
import org.utbot.examples.assemble.constructors.InheritComplexConstructor
import org.utbot.examples.assemble.constructors.InheritPrimitiveConstructor
import org.utbot.examples.assemble.constructors.PrimitiveConstructor
import org.utbot.examples.assemble.constructors.PrimitiveConstructorWithDefaultField
import org.utbot.examples.assemble.constructors.PrivateConstructor
import org.utbot.examples.assemble.constructors.PseudoComplexConstructor
import org.utbot.examples.assemble.defaults.DefaultField
import org.utbot.examples.assemble.defaults.DefaultFieldModifiedInConstructor
import org.utbot.examples.assemble.defaults.DefaultFieldWithDirectAccessor
import org.utbot.examples.assemble.defaults.DefaultFieldWithSetter
import org.utbot.examples.assemble.defaults.DefaultPackagePrivateField
import org.utbot.examples.assemble.statics.StaticField
import org.utbot.examples.assemble.ArrayOfComplexArrays
import org.utbot.examples.assemble.ArrayOfPrimitiveArrays
import org.utbot.examples.assemble.AssignedArray
import org.utbot.examples.assemble.ComplexArray
import org.utbot.examples.assemble.another.MethodUnderTest
import org.utbot.examples.assemble.PrimitiveArray
import org.utbot.examples.assemble.ComplexConstructor
import org.utbot.examples.assemble.ComplexConstructorWithSetter
import org.utbot.examples.assemble.ConstructorModifyingStatic
import org.utbot.examples.assemble.InheritComplexConstructor
import org.utbot.examples.assemble.InheritPrimitiveConstructor
import org.utbot.examples.assemble.PrimitiveConstructor
import org.utbot.examples.assemble.PrimitiveConstructorWithDefaultField
import org.utbot.examples.assemble.PrivateConstructor
import org.utbot.examples.assemble.PseudoComplexConstructor
import org.utbot.examples.assemble.DefaultField
import org.utbot.examples.assemble.DefaultFieldModifiedInConstructor
import org.utbot.examples.assemble.DefaultFieldWithDirectAccessor
import org.utbot.examples.assemble.DefaultFieldWithSetter
import org.utbot.examples.assemble.DefaultPackagePrivateField
import org.utbot.examples.assemble.StaticField
import org.utbot.framework.plugin.api.ClassId
import org.utbot.framework.plugin.api.ExecutableId
import org.utbot.framework.plugin.api.FieldId
Expand All @@ -58,7 +58,6 @@ import org.utbot.framework.util.SootUtils
import org.utbot.framework.util.instanceCounter
import org.utbot.framework.util.modelIdCounter
import kotlin.reflect.full.functions
import org.utbot.examples.assemble.*
import org.utbot.framework.codegen.model.constructor.util.arrayTypeOf

/**
Expand Down Expand Up @@ -150,8 +149,7 @@ class AssembleModelGeneratorTests {
fields(testClassId, "a" to 5, "b" to 3)
)

val methodFromAnotherPackage =
MethodUnderTest::class.functions.first()
val methodFromAnotherPackage = MethodUnderTest::class.functions.first()

createModelAndAssert(compositeModel, null, methodFromAnotherPackage.executableId)
}
Expand Down Expand Up @@ -413,7 +411,7 @@ class AssembleModelGeneratorTests {
val baseClassId = PrimitiveFields::class.id

val thisFields = fields(inheritedFieldClassId, "i" to 5, "d" to 3.0)
val baseFields = fields(baseClassId, "a" to 2, "b" to 4)
val baseFields = fields(baseClassId, "b" to 4)

val compositeModel = UtCompositeModel(
modelIdCounter.incrementAndGet(),
Expand All @@ -425,7 +423,6 @@ class AssembleModelGeneratorTests {
val v1 = statementsChain.addExpectedVariableDecl<InheritedField>()
statementsChain.add("$v1." + ("i" `=` 5))
statementsChain.add("$v1." + ("d" `=` 3.0))
statementsChain.add("$v1." + addExpectedSetter("a", 2))
statementsChain.add("$v1." + ("b" `=` 4))

val expectedRepresentation = printExpectedModel(inheritedFieldClassId.simpleName, v1, statementsChain)
Expand Down Expand Up @@ -1448,9 +1445,9 @@ class AssembleModelGeneratorTests {
private fun createModelsAndAssert(
models: List<UtModel>,
expectedModelRepresentations: List<String?>,
assembleTestUtils: ExecutableId = AssembleTestUtils::class.id.allMethods.first(),
assembleTestDummyMethod: ExecutableId = AssembleTestUtils::class.id.allMethods.first(),
) {
val modelsMap = AssembleModelGenerator(assembleTestUtils.classId.packageName).createAssembleModels(models)
val modelsMap = AssembleModelGenerator(assembleTestDummyMethod.classId.packageName).createAssembleModels(models)
//we sort values to fix order of models somehow (IdentityHashMap does not guarantee the order)
val assembleModels = modelsMap.values
.filterIsInstance<UtAssembleModel>()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ internal class UtBotFieldModificatorsTest {

//We use sorting here to make comparing with sorted in advance expected collections easier
private fun runFieldModificatorsSearch(analysisMode: AnalysisMode) =
fieldsModificatorsSearcher.findModificators(analysisMode, PrimitiveModifications::class.java.packageName)
fieldsModificatorsSearcher.findModificators(analysisMode)
.map { (key, value) ->
val modificatorNames = value.filterNot { it.name.startsWith("direct_set_") }.map { it.name }
key.name to modificatorNames.toSortedSet()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import org.utbot.framework.plugin.api.UtArrayModel
import org.utbot.framework.plugin.api.UtClassRefModel
import org.utbot.framework.plugin.api.UtCompositeModel
import org.utbot.framework.plugin.api.UtModel
import org.utbot.framework.plugin.api.util.executableId
import org.utbot.framework.plugin.api.util.id
import java.lang.reflect.Field
import java.lang.reflect.Method
Expand Down
Loading