@@ -367,20 +367,13 @@ open class CgMethodConstructor(val context: CgContext) : CgContextOwner by conte
367
367
}
368
368
}
369
369
370
- // TODO: ISSUE-1546 introduce some kind of language-specific string interpolation in Codegen
371
- private fun prepareArtificialFailureMessage (executionResult : UtExecutionResult ): CgVariable {
370
+ // TODO: ISSUE-1546 introduce some kind of language-specific string interpolation in Codegen
371
+ // and render arguments that cause overflow (but it requires engine enhancements)
372
+ private fun prepareArtificialFailureMessage (executionResult : UtExecutionResult ): CgLiteral {
372
373
when (executionResult) {
373
374
is UtOverflowFailure -> {
374
- val preparedMethodArguments = methodArguments.joinToString(separator = " , " ) {
375
- when (it) {
376
- is CgVariable -> it.name
377
- is CgLiteral -> it.value.toString()
378
- else -> it.toString()
379
- }
380
- }
381
-
382
- val failureMessage = " \" Overflow detected in \' ${currentExecutable!! .name} \' call with arguments $preparedMethodArguments \" "
383
- return CgVariable (failureMessage, stringClassId)
375
+ val failureMessage = " Overflow detected in \' ${currentExecutable!! .name} \' call"
376
+ return CgLiteral (stringClassId, failureMessage)
384
377
}
385
378
else -> error(" $executionResult is not supported in artificial errors" )
386
379
}
@@ -433,7 +426,7 @@ open class CgMethodConstructor(val context: CgContext) : CgContextOwner by conte
433
426
if (exception is AccessControlException ) return false
434
427
// tests with timeout or crash should be processed differently
435
428
if (exception is TimeoutException || exception is ConcreteExecutionFailureException ) return false
436
- if (exception is OverflowDetectionError ) return false
429
+ if (exception is ArtificialError ) return false
437
430
if (UtSettings .treatAssertAsErrorSuite && exception is AssertionError ) return false
438
431
439
432
val exceptionRequiresAssert = exception !is RuntimeException || runtimeExceptionTestsBehaviour == PASS
0 commit comments