Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mocking #108

Merged
merged 145 commits into from
Apr 30, 2024
Merged

Mocking #108

merged 145 commits into from
Apr 30, 2024

Conversation

ilma4
Copy link
Contributor

@ilma4 ilma4 commented Apr 4, 2024

No description provided.

fix replaceUninstantiableWithMocks
# Conflicts:
#	core/src/main/kotlin/org/vorpal/research/kex/util/KfgClassLoader.kt
#	kex-executor/src/main/kotlin/org/vorpal/research/kex/launcher/WorkerLauncher.kt
# Conflicts:
#	kex-annotation-processor/src/main/resources/SMTConverter.vm
@@ -296,6 +307,11 @@ class ClassInstantiationDetector(
override fun cleanup() {}

override fun visit(klass: Class) {
if (ignoredInstantiations.any { it.matches(klass) }) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need an ignore option here? What kind of classes do we want to filter out?

@@ -63,6 +63,46 @@ fun getJDKPath(): Path {

fun getJavaPath(): Path = Paths.get(System.getProperty("java.home"), "bin", "java").toAbsolutePath()

val Config.isMockingEnabled: Boolean
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is that we define the most widely used parameters as extension properties for Config in this file.

Although idea to extract all the mocking parameters into extension properties is not bad, I would move the majority of them into somewhere separate, e.g. into mockUtils.kt file

fixes
MockSetField, MockSequence -> MockList
@ilma4 ilma4 requested a review from AbdullinAM April 25, 2024 10:24
@AbdullinAM AbdullinAM merged commit 6046dc2 into vorpal-research:master Apr 30, 2024
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants