struct _NmtstTestData {
const char *testpath;
- const char *detail;
NmtstTestDataRelease fcn_release;
gsize n_args;
gpointer args[1];
};
inline static void
-_nmtst_test_data_unpack_detail (const NmtstTestData *test_data, const char **detail, gsize n_args, ...)
+_nmtst_test_data_unpack (const NmtstTestData *test_data, gsize n_args, ...)
{
gsize i;
va_list ap;
g_assert (test_data);
g_assert_cmpint (n_args, ==, test_data->n_args);
- if (detail)
- *detail = test_data->detail;
-
va_start (ap, n_args);
for (i = 0; i < n_args; i++) {
p = va_arg (ap, gpointer *);
}
va_end (ap);
}
-#define nmtst_test_data_unpack_detail(test_data, detail, ...) _nmtst_test_data_unpack_detail(test_data, detail, NM_NARG (__VA_ARGS__), ##__VA_ARGS__)
-#define nmtst_test_data_unpack(test_data, ...) nmtst_test_data_unpack_detail(test_data, NULL, ##__VA_ARGS__)
+#define nmtst_test_data_unpack(test_data, ...) _nmtst_test_data_unpack(test_data, NM_NARG (__VA_ARGS__), ##__VA_ARGS__)
inline static void
_nmtst_test_data_free (gpointer data)
test_data->fcn_release (test_data);
g_free ((gpointer) test_data->testpath);
- g_free ((gpointer) test_data->detail);
g_free (test_data);
}
inline static void
-_nmtst_add_test_func_full (const char *testpath, const char *detail, GTestDataFunc test_func, NmtstTestDataRelease fcn_release, gsize n_args, ...)
+_nmtst_add_test_func_full (const char *testpath, GTestDataFunc test_func, NmtstTestDataRelease fcn_release, gsize n_args, ...)
{
gsize i;
NmtstTestData *data;
data = g_malloc (G_STRUCT_OFFSET (NmtstTestData, args) + sizeof (gpointer) * (n_args + 1));
data->testpath = g_strdup (testpath);
- data->detail = g_strdup (detail);
data->fcn_release = fcn_release;
data->n_args = n_args;
va_start (ap, n_args);
test_func,
_nmtst_test_data_free);
}
-#define nmtst_add_test_func_full(testpath, detail, test_func, fcn_release, ...) _nmtst_add_test_func_full(testpath, detail, test_func, fcn_release, NM_NARG (__VA_ARGS__), ##__VA_ARGS__)
-#define nmtst_add_test_func(testpath, detail, test_func, ...) nmtst_add_test_func_full(testpath, detail, test_func, NULL, ##__VA_ARGS__)
+#define nmtst_add_test_func_full(testpath, test_func, fcn_release, ...) _nmtst_add_test_func_full(testpath, test_func, fcn_release, NM_NARG (__VA_ARGS__), ##__VA_ARGS__)
+#define nmtst_add_test_func(testpath, test_func, ...) nmtst_add_test_func_full(testpath, test_func, NULL, ##__VA_ARGS__)
/*****************************************************************************/