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
3 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -612,7 +612,7 @@ enum class RuntimeExceptionTestsBehaviour(
612
612
// Get is mandatory because of the initialization order of the inheritors.
613
613
// Otherwise, in some cases we could get an incorrect value
614
614
companion object : CodeGenerationSettingBox {
615
- override val defaultItem: RuntimeExceptionTestsBehaviour get() = FAIL
615
+ override val defaultItem: RuntimeExceptionTestsBehaviour get() = PASS
616
616
override val allItems: List <RuntimeExceptionTestsBehaviour > = values().toList()
617
617
}
618
618
}
Original file line number Diff line number Diff line change @@ -408,19 +408,14 @@ abstract class CgAbstractRenderer(
408
408
409
409
val isBlockTooLarge = workaround(LONG_CODE_FRAGMENTS ) { block.size > LARGE_CODE_BLOCK_SIZE }
410
410
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
+ }
419
416
}
420
417
}
421
418
422
- if (isBlockTooLarge) println (" */" )
423
-
424
419
print (" }" )
425
420
426
421
if (printNextLine) println ()
@@ -982,6 +977,6 @@ abstract class CgAbstractRenderer(
982
977
/* *
983
978
* @see [LONG_CODE_FRAGMENTS]
984
979
*/
985
- private const val LARGE_CODE_BLOCK_SIZE : Int = 1000
980
+ private const val LARGE_CODE_BLOCK_SIZE : Int = 150
986
981
}
987
982
}
Original file line number Diff line number Diff line change @@ -4,5 +4,9 @@ import java.nio.file.FileSystems
4
4
5
5
6
6
fun 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 } '"
8
12
}
You can’t perform that action at this time.
0 commit comments