A few small tweaks to #CTRAN today.
I've started shifting small amounts of code out of the main ctran.pp file and into separate units. I've also started writing some proper unit tests for this code - small ones, but they're there.
FPCUnit does the job, but it doesn't feel comfortable to me yet. It seems less polished than other test suites that I've seen for other languages. But it could also just be me.
FPCUnit is bundled with Free Pascal, so I want to give it a proper go before trying something else. For example, FPTest also exists, but it hasn't been updated in about 5 years.
I currently have no idea how to test a lot of other parts of the code without doing a lot of up-front work to "feed" these functions/methods with suitable data. My gut says that I need to tackle the smaller functions first. Once I can rely on them, then I can use them to test the larger ones.
I know it's progress. It just doesn't feel like much.






