aboutsummaryrefslogtreecommitdiff
path: root/src/tests/test-sms-part-3gpp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/test-sms-part-3gpp.c')
-rw-r--r--src/tests/test-sms-part-3gpp.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/src/tests/test-sms-part-3gpp.c b/src/tests/test-sms-part-3gpp.c
index 387cf151..9c67e6b9 100644
--- a/src/tests/test-sms-part-3gpp.c
+++ b/src/tests/test-sms-part-3gpp.c
@@ -26,23 +26,6 @@
#include "mm-sms-part-3gpp.h"
#include "mm-log.h"
-/* If defined will print debugging traces */
-#ifdef TEST_SMS_PART_ENABLE_TRACE
-#define trace_pdu(pdu, pdu_len) do { \
- guint i; \
- \
- g_print ("\n "); \
- for (i = 0; i < len; i++) { \
- g_print (" 0x%02X", pdu[i]); \
- if (((i + 1) % 12) == 0) \
- g_print ("\n "); \
- } \
- g_print ("\n"); \
- } while (0)
-#else
-#define trace_pdu(...)
-#endif
-
/********************* PDU PARSER TESTS *********************/
static void
@@ -509,6 +492,21 @@ test_address_encode_unknown (void)
/********************* PDU CREATOR TESTS *********************/
static void
+trace_pdu (const guint8 *pdu,
+ guint len)
+{
+ guint i;
+
+ g_print ("n ");
+ for (i = 0; i < len; i++) {
+ g_print (" 0x%02X", pdu[i]);
+ if (((i + 1) % 12) == 0)
+ g_print ("n ");
+ }
+ g_print ("n");
+}
+
+static void
common_test_create_pdu (const gchar *smsc,
const gchar *number,
const gchar *text,
@@ -549,7 +547,8 @@ common_test_create_pdu (const gchar *smsc,
&error);
mm_sms_part_free (part);
- trace_pdu (pdu, len);
+ if (g_test_verbose ())
+ trace_pdu (pdu, len);
g_assert_no_error (error);
g_assert (pdu != NULL);