I needed to update kotlin poet, but the newer version has some slight changes to output, notably that explicit public modifiers are now added. It would have been quite tedious to manually update all of the hard coded inputs and outputs of the processor tests, so I took this opportunity to refactor them.
The new approach stores all inputs and outputs in resource folders, with a specific folder per test class and test method. The resources are automatically retrieved based on the test name so the actual test function declaration is essentially just stating the test name and whether it expects to succeed or fail with a certain message.
There is also a new boolean flag that can be enabled to automatically update the outputs, which I used for the kotlinpoet update. This is split into a separate commit for easy reviewing.
I needed to update kotlin poet, but the newer version has some slight changes to output, notably that explicit public modifiers are now added. It would have been quite tedious to manually update all of the hard coded inputs and outputs of the processor tests, so I took this opportunity to refactor them.
The new approach stores all inputs and outputs in resource folders, with a specific folder per test class and test method. The resources are automatically retrieved based on the test name so the actual test function declaration is essentially just stating the test name and whether it expects to succeed or fail with a certain message.
There is also a new boolean flag that can be enabled to automatically update the outputs, which I used for the kotlinpoet update. This is split into a separate commit for easy reviewing.