juce_GridUnitTests.cpp always included, not only when JUCE_UNIT_TESTS is enabled


#1

This is on the develop branch.

Also the GridUnitTests object throws an error when the object is being deleted (malloc guard says we try to delete zone that hasn’t been allocated).

@jules, by the history of the repo, it seems that you’ve worked last on this.

Cheers.


#2

Thanks for the heads up about the unnecessary include.

I can’t reproduce a problem though, even running with address sanitiser or guard malloc turned on… What objects exactly seem to be involved?


#3

My bad about the error.

I was instantiating my tests on the heap, while the JUCE tests are static. Then I am deleting all tests (which was required for mine), and if a static one got in (as the one included without the JUCE_UNIT_TESTS), it would blow up when I try to delete it. I changed all of my tests to static instantiation now, so I can run all of the UnitTests with my runner.