At long last, I have implemented few rudimentary unit tests for SensESP. Not great, but at least it will be easier to add new ones in the future.
Also at long last, I have taken some steps to improve memory safety on SensESP. The codebase has been quite nonchalant about creating objects on the heap and not properly tracking them. This hasn't been an issue as long as the enclosing objects haven't been destroyed, but it's not a good practice, and with unit testing, it should be expected that the whole SensESP app will be torn down. I have now wrapped many internal heap objects in shared_ptr or unique_ptr and also added some destructors for select classes.
At long last, I have implemented few rudimentary unit tests for SensESP. Not great, but at least it will be easier to add new ones in the future.
Also at long last, I have taken some steps to improve memory safety on SensESP. The codebase has been quite nonchalant about creating objects on the heap and not properly tracking them. This hasn't been an issue as long as the enclosing objects haven't been destroyed, but it's not a good practice, and with unit testing, it should be expected that the whole SensESP app will be torn down. I have now wrapped many internal heap objects in
shared_ptr
orunique_ptr
and also added some destructors for select classes.