-
Notifications
You must be signed in to change notification settings - Fork 20
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
Mocking #108
Conversation
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
`generateInitialDescriptors` returns `InitialDescriptors`
# Conflicts: # kex-core/src/main/kotlin/org/vorpal/research/kex/util/rt.kt # kex-executor/src/main/kotlin/org/vorpal/research/kex/launcher/WorkerLauncher.kt # kex-runner/src/main/kotlin/org/vorpal/research/kex/compile/CompilerHelper.kt # kex.py
@@ -296,6 +307,11 @@ class ClassInstantiationDetector( | |||
override fun cleanup() {} | |||
|
|||
override fun visit(klass: Class) { | |||
if (ignoredInstantiations.any { it.matches(klass) }) { |
There was a problem hiding this comment.
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?
kex-core/src/main/kotlin/org/vorpal/research/kex/util/HackedClassLoader.kt
Outdated
Show resolved
Hide resolved
kex-core/src/main/kotlin/org/vorpal/research/kex/util/HackedClassLoader.kt
Outdated
Show resolved
Hide resolved
@@ -63,6 +63,46 @@ fun getJDKPath(): Path { | |||
|
|||
fun getJavaPath(): Path = Paths.get(System.getProperty("java.home"), "bin", "java").toAbsolutePath() | |||
|
|||
val Config.isMockingEnabled: Boolean |
There was a problem hiding this comment.
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
kex-runner/src/main/kotlin/org/vorpal/research/kex/reanimator/actionsequence/ActionSequence.kt
Outdated
Show resolved
Hide resolved
fixes MockSetField, MockSequence -> MockList
No description provided.