File tree Expand file tree Collapse file tree 3 files changed +12
-13
lines changed
utbot-framework/src/main/kotlin/org/utbot/framework/codegen
utbot-python/src/main/kotlin/org/utbot/python/framework/codegen/utils Expand file tree Collapse file tree 3 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -612,7 +612,7 @@ enum class RuntimeExceptionTestsBehaviour(
612612 // Get is mandatory because of the initialization order of the inheritors.
613613 // Otherwise, in some cases we could get an incorrect value
614614 companion object : CodeGenerationSettingBox {
615- override val defaultItem: RuntimeExceptionTestsBehaviour get() = FAIL
615+ override val defaultItem: RuntimeExceptionTestsBehaviour get() = PASS
616616 override val allItems: List <RuntimeExceptionTestsBehaviour > = values().toList()
617617 }
618618}
Original file line number Diff line number Diff line change @@ -408,19 +408,14 @@ abstract class CgAbstractRenderer(
408408
409409 val isBlockTooLarge = workaround(LONG_CODE_FRAGMENTS ) { block.size > LARGE_CODE_BLOCK_SIZE }
410410
411- if (isBlockTooLarge) {
412- print (" /*" )
413- println (" This block of code is ${block.size} lines long and could lead to compilation error" )
414- }
415-
416- withIndent {
417- for (statement in block) {
418- statement.accept(this )
411+ if (! isBlockTooLarge) {
412+ withIndent {
413+ for (statement in block) {
414+ statement.accept(this )
415+ }
419416 }
420417 }
421418
422- if (isBlockTooLarge) println (" */" )
423-
424419 print (" }" )
425420
426421 if (printNextLine) println ()
@@ -982,6 +977,6 @@ abstract class CgAbstractRenderer(
982977 /* *
983978 * @see [LONG_CODE_FRAGMENTS]
984979 */
985- private const val LARGE_CODE_BLOCK_SIZE : Int = 1000
980+ private const val LARGE_CODE_BLOCK_SIZE : Int = 150
986981 }
987982}
Original file line number Diff line number Diff line change @@ -4,5 +4,9 @@ import java.nio.file.FileSystems
44
55
66fun String.toRelativeRawPath (): String {
7- return " os.path.dirname(__file__) + r'${FileSystems .getDefault().separator}${this } '"
7+ val dirname = " os.path.dirname(__file__)"
8+ if (this .isEmpty()) {
9+ return dirname
10+ }
11+ return " $dirname + r'${FileSystems .getDefault().separator}${this } '"
812}
You can’t perform that action at this time.
0 commit comments