tests: use the new binding in blit tests
v2: Object::memories() return type changed
added test_error_callback()
diff --git a/tests/test_common.h b/tests/test_common.h
index f93ae08..d4ff359 100644
--- a/tests/test_common.h
+++ b/tests/test_common.h
@@ -14,7 +14,7 @@
#define ASSERT_XGL_SUCCESS(err) ASSERT_EQ(XGL_SUCCESS, err) << xgl_result_string(err)
-static const char *xgl_result_string(XGL_RESULT err)
+static inline const char *xgl_result_string(XGL_RESULT err)
{
switch (err) {
#define STR(r) case r: return #r
@@ -63,4 +63,10 @@
}
}
+static inline void test_error_callback(const char *expr, const char *file,
+ unsigned int line, const char *function)
+{
+ ADD_FAILURE_AT(file, line) << "Assertion: `" << expr << "'";
+}
+
#endif // TEST_COMMON_H