The most straight-forward way to do this would be to add a new “Test” target to the project which could build the test files, link files to be tested, and run as a command-line app or something. But Projucer does not (that I’ve found) let you add new targets, and will overwrite any targets you add to the project manually. So that’s out.
Searching around for a solution, the information is all old and fragmented. “Use cmake”, or “don’t test plugins” or “copy your code into the sample UnitTestRunner project and run it there” or “ifdef out calls to UnitTestRunner (and, I guess, all your test files?) until you want to run”. I’m hoping someone can provide a modern, canonical answer to the question:
What are the best practices when it comes to running unit tests for Projucer-managed audio plugin built in Xcode?