as a general annotation processing question: how c...
# ksp
w
as a general annotation processing question: how can i write unit tests for one? I can check the compilation output with the
kotlin-compile-testing
library, but I’m interested in testing the functionality. Is the best option to create a new module which depends on the annotation processor and run tests there?
Btw, there are a lot more unit tests than integration tests because you can create whatever broken case you want in unit tests vs integration tests can only test happy paths (and in my experience, writing a processor is a lot more about detecting developer errors 🤷‍♂️)
w
do you have an example file with some of the unit tests?
trying to look for that now
y
There is a lot of abstraction it ceremony in these tests so they might be harder to read for an unfamiliar person
w
thank you for sharing