[test] Work around glib <= 2.30 API
authorBehdad Esfahbod <behdad@behdad.org>
Tue, 12 Jul 2011 16:02:26 +0000 (12:02 -0400)
committerBehdad Esfahbod <behdad@behdad.org>
Tue, 12 Jul 2011 16:02:26 +0000 (12:02 -0400)
test/hb-test.h

index 09008aa..de9a79a 100644 (file)
@@ -156,6 +156,10 @@ typedef void (*hb_test_fixture_func_t) (gpointer      fixture,
                                         gconstpointer user_data);
 #endif
 
+#if !GLIB_CHECK_VERSION(2,30,0)
+#define g_test_fail() g_error("Test failed")
+#endif
+
 static inline void
 hb_test_add_func (const char *test_path,
                  hb_test_func_t   test_func)