21 #include <gtest/gtest.h>
27 class CrashOnDestruction {
32 ~CrashOnDestruction() { abort(); }
35 NoDestruct<std::unique_ptr<int>> g_test_int(
new int(42));
36 NoDestruct<CrashOnDestruction> g_test_crash_on_destruction;
40 TEST(NoDestruct, CrashOnDestructionIsAccessible) {
41 g_test_crash_on_destruction->Exists();
44 bool g_thing_constructed =
false;
50 g_thing_constructed =
true;
53 int Add(
int i,
int j) {
return i +
j; }
59 TEST(GlobalSingleton, Works) {
71 int main(
int argc,
char** argv) {