Kunal Dabir
01/28/2021, 5:40 PMMatteo Mirk
01/29/2021, 8:53 AMKunal Dabir
01/29/2021, 9:26 AMMatteo Mirk
01/29/2021, 10:35 AMMatteo Mirk
01/29/2021, 10:58 AMKunal Dabir
01/29/2021, 11:00 AMKunal Dabir
01/29/2021, 11:02 AMMatteo Mirk
01/29/2021, 11:09 AMreturn count + 1
is in the output, for the rest you can use regexes. Escaping isn’t a problem anymore if you use raw strings: """..."""
. My rationale for this is to avoid useless testing, that is: when I have to craft an expected output with all the formatting, I’m basically testing that KotlinPoet does its job, but that’s redundant since the lib has already been tested. What I want to test are the relevant parts of the TypeSpec I’ve built that will produce the source I want.Kunal Dabir
01/29/2021, 11:12 AMKunal Dabir
01/29/2021, 11:15 AMgeneratedCode shouldContain "data class Foo"
but the moment you add constructor params etc, it starts getting trickyMatteo Mirk
01/29/2021, 11:25 AMKunal Dabir
02/01/2021, 2:58 PMKunal Dabir
02/01/2021, 2:59 PMglureau
10/27/2022, 9:52 PMKunal Dabir
11/18/2022, 11:59 AMMatteo Mirk
11/21/2022, 4:04 PM