Skip to content

Commit 6e9d74b

Browse files
Kamenev YuryDamtev
authored andcommitted
Fixed flaky overflow tests
1 parent d30e510 commit 6e9d74b

File tree

2 files changed

+181
-152
lines changed

2 files changed

+181
-152
lines changed

utbot-framework/src/test/kotlin/org/utbot/examples/AbstractTestCaseGeneratorTest.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2765,3 +2765,13 @@ inline fun <reified T> withPushingStateFromPathSelectorForConcrete(block: () ->
27652765
UtSettings.saveRemainingStatesForConcreteExecution = prev
27662766
}
27672767
}
2768+
2769+
inline fun <reified T> withTreatingOverflowAsError(block: () -> T): T {
2770+
val prev = UtSettings.treatOverflowAsError
2771+
UtSettings.treatOverflowAsError = true
2772+
try {
2773+
return block()
2774+
} finally {
2775+
UtSettings.treatOverflowAsError = prev
2776+
}
2777+
}

0 commit comments

Comments
 (0)