UPSTREAM: unit/test-uuid: Fix using strcmp
It is no longer guaranteed the string will match since bt_uuid_to_string
now always uses 128 Bits format to be consistent with the format used
over D-Bus.
(cherry picked from commit 1f2e03bc5262e412e822dec7c17a783c487c18cb)
BUG=chrome-os-partner:48794
TEST=manually
Change-Id: Iaf63c4cbc44b5d4994f4b50539d889310d89df18
Reviewed-on: https://chromium-review.googlesource.com/325184
Commit-Ready: Wei-Ning Huang <wnhuang@chromium.org>
Tested-by: Wei-Ning Huang <wnhuang@chromium.org>
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
diff --git a/unit/test-uuid.c b/unit/test-uuid.c
index 5f45b0c..7c6789e 100644
--- a/unit/test-uuid.c
+++ b/unit/test-uuid.c
@@ -151,7 +151,7 @@
g_assert(bt_string_to_uuid(&uuid, test_data->str) == 0);
bt_uuid_to_string(&uuid, buf, sizeof(buf));
- g_assert(strcasecmp(buf, str) == 0);
+ g_assert(bt_uuid_strcmp(buf, str) == 0);
switch (test_data->type) {
case BT_UUID16:
@@ -166,7 +166,7 @@
}
bt_uuid_to_string(&uuid, buf, sizeof(buf));
- g_assert(strcasecmp(buf, str) == 0);
+ g_assert(bt_uuid_strcmp(buf, str) == 0);
tester_test_passed();
}