diff options
author | Ben Chan <benchan@chromium.org> | 2017-07-27 19:45:53 -0700 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2017-07-28 09:47:54 +0200 |
commit | 8e64510e706d7192ec9e0db6c506d05beda9820c (patch) | |
tree | cf2385f5e14b9e5977c4e6a8a0f554c684d17049 /src/libmbim-glib/test | |
parent | 0e2ad4993ebcbcbc52ca0b0cc13a65ecfcbd81c8 (diff) |
mbim-common: turn __mbim_utils_str_hex into mbim_common_str_hex
__mbim_utils_str_hex is a useful utility method for returning a hexadecimal
string representation of a sequence of bytes in memory. This patch turns it
into 'mbim_common_str_hex', which can be shared between libmbim-glib and
mbimcli.
Diffstat (limited to 'src/libmbim-glib/test')
-rw-r--r-- | src/libmbim-glib/test/Makefile.am | 4 | ||||
-rw-r--r-- | src/libmbim-glib/test/test-message-builder.c | 6 | ||||
-rw-r--r-- | src/libmbim-glib/test/test-message-parser.c | 6 |
3 files changed, 10 insertions, 6 deletions
diff --git a/src/libmbim-glib/test/Makefile.am b/src/libmbim-glib/test/Makefile.am index cddfb26..d492ed8 100644 --- a/src/libmbim-glib/test/Makefile.am +++ b/src/libmbim-glib/test/Makefile.am @@ -69,11 +69,13 @@ test_message_parser_SOURCES = \ test_message_parser_CPPFLAGS = \ $(LIBMBIM_GLIB_CFLAGS) \ -I$(top_srcdir) \ + -I$(top_srcdir)/src/common \ -I$(top_srcdir)/src/libmbim-glib \ -I$(top_builddir)/src/libmbim-glib \ -I$(top_builddir)/src/libmbim-glib/generated \ -DLIBMBIM_GLIB_COMPILATION test_message_parser_LDADD = \ + $(top_builddir)/src/common/libmbim-common.la \ $(top_builddir)/src/libmbim-glib/libmbim-glib-core.la \ $(top_builddir)/src/libmbim-glib/generated/libmbim-glib-generated.la \ $(LIBMBIM_GLIB_LIBS) @@ -83,11 +85,13 @@ test_message_builder_SOURCES = \ test_message_builder_CPPFLAGS = \ $(LIBMBIM_GLIB_CFLAGS) \ -I$(top_srcdir) \ + -I$(top_srcdir)/src/common \ -I$(top_srcdir)/src/libmbim-glib \ -I$(top_builddir)/src/libmbim-glib \ -I$(top_builddir)/src/libmbim-glib/generated \ -DLIBMBIM_GLIB_COMPILATION test_message_builder_LDADD = \ + $(top_builddir)/src/common/libmbim-common.la \ $(top_builddir)/src/libmbim-glib/libmbim-glib-core.la \ $(top_builddir)/src/libmbim-glib/generated/libmbim-glib-generated.la \ $(LIBMBIM_GLIB_LIBS) diff --git a/src/libmbim-glib/test/test-message-builder.c b/src/libmbim-glib/test/test-message-builder.c index 18fd29d..c467eef 100644 --- a/src/libmbim-glib/test/test-message-builder.c +++ b/src/libmbim-glib/test/test-message-builder.c @@ -20,7 +20,7 @@ #include "mbim-message-private.h" #include "mbim-cid.h" #include "mbim-enums.h" -#include "mbim-utils.h" +#include "mbim-common.h" #include "mbim-basic-connect.h" #include "mbim-ussd.h" #include "mbim-auth.h" @@ -38,8 +38,8 @@ test_message_trace (const guint8 *computed, gchar *message_str; gchar *expected_str; - message_str = __mbim_utils_str_hex (computed, computed_size, ':'); - expected_str = __mbim_utils_str_hex (expected, expected_size, ':'); + message_str = mbim_common_str_hex (computed, computed_size, ':'); + expected_str = mbim_common_str_hex (expected, expected_size, ':'); /* Dump all message contents */ g_print ("\n" diff --git a/src/libmbim-glib/test/test-message-parser.c b/src/libmbim-glib/test/test-message-parser.c index a71c8c5..3ba4946 100644 --- a/src/libmbim-glib/test/test-message-parser.c +++ b/src/libmbim-glib/test/test-message-parser.c @@ -24,7 +24,7 @@ #include "mbim-ms-firmware-id.h" #include "mbim-message.h" #include "mbim-cid.h" -#include "mbim-utils.h" +#include "mbim-common.h" #if defined ENABLE_TEST_MESSAGE_TRACES static void @@ -36,8 +36,8 @@ test_message_trace (const guint8 *computed, gchar *message_str; gchar *expected_str; - message_str = __mbim_utils_str_hex (computed, computed_size, ':'); - expected_str = __mbim_utils_str_hex (expected, expected_size, ':'); + message_str = mbim_common_str_hex (computed, computed_size, ':'); + expected_str = mbim_common_str_hex (expected, expected_size, ':'); /* Dump all message contents */ g_print ("\n" |