[Test] Change indent from four to two spaces in generated tests

This is needed to reduce the size of generated test files, which started
  to exceed default IDE limit
This commit is contained in:
Dmitriy Novozhilov
2024-02-16 13:01:51 +02:00
committed by Space Team
parent 9b5a9ccba8
commit d9beae0556
3 changed files with 3 additions and 2 deletions
@@ -111,7 +111,7 @@ private class TestGeneratorImplInstance(
private fun generate(): String {
val out = StringBuilder()
val p = Printer(out)
val p = Printer(out, indentUnit = Printer.TWO_SPACE_INDENT)
val copyright = File("license/COPYRIGHT_HEADER.txt").readText()
p.println(copyright)
@@ -145,6 +145,7 @@ open class Printer private constructor(
companion object {
private const val DEFAULT_INDENTATION_UNIT = " "
const val TWO_SPACE_INDENT = " ";
@JvmField
val LINE_SEPARATOR: String = System.getProperty("line.separator")
@@ -123,7 +123,7 @@ class NewTestGeneratorImpl(
private fun generate(): String {
val out = StringBuilder()
val p = Printer(out)
val p = Printer(out, indentUnit = Printer.TWO_SPACE_INDENT)
val copyright = File("license/COPYRIGHT_HEADER.txt").takeIf { it.exists() }?.readText() ?: ""
p.println(copyright)