#include #include "backend/util.h" TEST(Util, SafeFree) { char * str = static_cast(malloc(3)); ASSERT_NE(str, nullptr); safe_free(&str); ASSERT_EQ(str, nullptr); // this shouldn't cause double free() error: safe_free(&str); }