codegen-kotlin: Don't generate equals/hashCode/toString/copy/:Serializable for abstract classes (#714)

* codegen-kotlin: Don't generate equals/hashCode/toString/copy/:Serializable for abstract classes

* Polish KotlinCodeGeneratorTest

- use `assertContains()` instead of `assertThat().contains()`
- remove redundant `trimIndent()` and `trimMargin()` calls
- rename `javaCode` to `kotlinCode`

* Overhaul KotlinCodeGeneratorTest

- introduce classes KotlinSourceCode and KotlinSourceCodeAssert
- change assertions to use KotlinSourceCodeAssert via `assertThat(kotlinCode)`
- use explicit trimIndent() and trimMargin() for multiline string literals
  - IntelliJ editor desperately wants to insert trimIndent()
  - can be used by kotlinc and ktfmt
- format code in the exact way it falls out of the IntelliJ editor
  (successfully destroyed by ktfmt)
This commit is contained in:
translatenix
2024-10-23 21:31:08 -07:00
committed by GitHub
parent f9fe226eba
commit 730257861f
2 changed files with 853 additions and 771 deletions
File diff suppressed because it is too large Load Diff