tests: enable logging if 'ENABLE_TEST_MESSAGE_TRACES' is defined

This commit is contained in:
Aleksander Morgado
2013-11-01 15:43:44 +01:00
parent deaeeec367
commit 04b52d590f
3 changed files with 30 additions and 0 deletions

View File

@@ -71,7 +71,17 @@ _mm_log (const char *loc,
const char *fmt, const char *fmt,
...) ...)
{ {
#if defined ENABLE_TEST_MESSAGE_TRACES
/* Dummy log function */ /* Dummy log function */
va_list args;
gchar *msg;
va_start (args, fmt);
msg = g_strdup_vprintf (fmt, args);
va_end (args);
g_print ("%s\n", msg);
g_free (msg);
#endif
} }
int main (int argc, char **argv) int main (int argc, char **argv)

View File

@@ -2317,7 +2317,17 @@ _mm_log (const char *loc,
const char *fmt, const char *fmt,
...) ...)
{ {
#if defined ENABLE_TEST_MESSAGE_TRACES
/* Dummy log function */ /* Dummy log function */
va_list args;
gchar *msg;
va_start (args, fmt);
msg = g_strdup_vprintf (fmt, args);
va_end (args);
g_print ("%s\n", msg);
g_free (msg);
#endif
} }
#define TESTCASE(t, d) g_test_create_case (#t, 0, d, NULL, (GTestFixtureFunc) t, NULL) #define TESTCASE(t, d) g_test_create_case (#t, 0, d, NULL, (GTestFixtureFunc) t, NULL)

View File

@@ -451,7 +451,17 @@ _mm_log (const char *loc,
const char *fmt, const char *fmt,
...) ...)
{ {
#if defined ENABLE_TEST_MESSAGE_TRACES
/* Dummy log function */ /* Dummy log function */
va_list args;
gchar *msg;
va_start (args, fmt);
msg = g_strdup_vprintf (fmt, args);
va_end (args);
g_print ("%s\n", msg);
g_free (msg);
#endif
} }
int main (int argc, char **argv) int main (int argc, char **argv)