[CMake] Properly test if compiler supports compiler flags
[WebKit-https.git] / Tools / TestWebKitAPI / glib / WebKitGLib / TestMain.h
index 36e03fd..d9c2ee1 100644 (file)
 #define MAKE_GLIB_TEST_FIXTURE_WITH_SETUP_TEARDOWN(ClassName, setup, teardown) \
     static void setUp(ClassName* fixture, gconstpointer data) \
     { \
-        if (setup) \
-            setup(); \
+        setup(); \
         new (fixture) ClassName; \
     } \
     static void tearDown(ClassName* fixture, gconstpointer data) \
     { \
         fixture->~ClassName(); \
-        if (teardown) \
-            teardown(); \
+        teardown(); \
     } \
     static void add(const char* suiteName, const char* testName, void (*testFunc)(ClassName*, const void*)) \
     { \
@@ -173,6 +171,7 @@ public:
             return resourcesDir.get();
         }
         }
+        RELEASE_ASSERT_NOT_REACHED();
     }
 
     void addLogFatalFlag(unsigned flag)