Skip to content

Commit

Permalink
fix: fix empty issue
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Dec 24, 2023
1 parent fef5b88 commit c8706eb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ class ClassTestCodeBuilder(private val context: JobContext) : TestCodeBuilder {
underTestFile: CodeDataStruct,
relevantClasses: List<CodeDataStruct>,
): List<BasicTestIns> {
var generatedCode = dataStruct.toSourceCode()
val generatedCode = dataStruct.toSourceCode()
if (generatedCode.lines().size > context.insQualityThreshold.maxLineInCode) {
generatedCode = generatedCode.lines().take(context.insQualityThreshold.maxLineInCode).joinToString("\n")
return emptyList()
}

val namingStyle = dataStruct.checkNamingStyle()
Expand Down

0 comments on commit c8706eb

Please sign in to comment.