We use --wrap for LLVM and we override the weak symbol in GCC for the terminate handler. This allows us to set the default handler, eliminating the printing variant within LLVM and GCC. std::set_terminate should see the new symbol and update it as usual. Same for the getter function. We need to expose that symbol in the test, invoke set_terminate, and check if the value is updated to what we passed in. Testing the getter is as you'd expect.