Godot-SFT: Godot 4 GDExtension C++ Unit Testing Library

Hello godot people, l’ve been working on a project using GDExtension C++ and have gotten to the point to where I really need to write tests so I can be sure I’m not breaking things with new changes all the time. After looking online there didn’t seem to be a great solution for me so I made my own that I’ve been using to test everything in my project and figured I’d pull it out of my code and share it. The testing “library” is only around 50 lines of code and is really just a couple of semi black magic macros in a header file that check conditions. It’s designed to be integrated really well with Gdexetension C++ and also has a simple way to setup with Scons + pre-commit/GitHub actions for easy automated testing.
You can get the code here, the README has a lot more information:

Hopefully this can be useful for some people, let me know if you have any thoughts or suggestions.

I’m curious if you considered the Godot source testing framework?

I did check out gtest and doctest (godot uses doctest) but they were both way too complicated and had way too many features for what I was trying to do.

It was much faster for me to just make my own solution than to figure out how to use one of the other frameworks and then also somehow get it running in a simple way in the gdextension environment. Writing it myself also allowed me to have the tests better integrated into the gdextension/editor/godot workflow that would have been pretty annoying to setup with another framework.