Skip to content
Snippets Groups Projects
Commit bf1b3965 authored by Ben Chan's avatar Ben Chan Committed by Aleksander Morgado
Browse files

tests: use memcmp() instead of g_assert_cmpmem() for now

g_assert_cmpmem() isn't available until glib 2.46, while the minimum
glib version required by ModemManager is 2.36. This patch replaces the
uses of g_assert_cmpmem() with memcmp() instead.
parent 2522efb3
No related branches found
No related tags found
Loading
......@@ -76,8 +76,7 @@ test_pco_list_add (void)
pco_data = mm_pco_get_data (pco, &pco_data_size);
g_assert (pco_data != NULL);
g_assert_cmpuint (pco_data_size, ==, expected_pco->pco_data_size);
g_assert_cmpmem (pco_data, pco_data_size,
expected_pco->pco_data, expected_pco->pco_data_size);
g_assert_cmpint (memcmp (pco_data, expected_pco->pco_data, pco_data_size), ==, 0);
}
mm_pco_list_free (list);
......
......@@ -164,8 +164,7 @@ test_parse_vendor_pco_info (void)
pco_data = mm_pco_get_data (pco, &pco_data_size);
g_assert (pco_data != NULL);
g_assert_cmpuint (pco_data_size, ==, good_pco_infos[i].pco_data_size);
g_assert_cmpmem (pco_data, pco_data_size,
good_pco_infos[i].pco_data, good_pco_infos[i].pco_data_size);
g_assert_cmpint (memcmp (pco_data, good_pco_infos[i].pco_data, pco_data_size), ==, 0);
g_object_unref (pco);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment