Skip to content

Commit

Permalink
Result execution state builds for exception result
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniilStepanov committed Oct 30, 2023
1 parent 10c72e7 commit adced43
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,10 @@ class UTestExecutor(
else -> methodInvocationResult.getOrNull()
}
if (unpackedInvocationResult is Throwable) {
val trace = JcInstructionTracer.getTrace()
accessedStatics.addAll(trace.statics.toSet())
val resultExecutionState =
buildExecutionState(callMethodExpr, executor, resultStateDescriptorBuilder, accessedStatics)
return UTestExecutionExceptionResult(
cause = buildExceptionDescriptor(
builder = resultStateDescriptorBuilder,
Expand All @@ -103,8 +107,7 @@ class UTestExecutor(
),
trace = JcInstructionTracer.getTrace().trace,
initialState = initExecutionState,
//TODO!!! decide if should we build resulting state
resultState = initExecutionState
resultState = resultExecutionState
)
}
val methodInvocationResultDescriptor =
Expand Down

0 comments on commit adced43

Please sign in to comment.