Diff between d00eeba33b1538b0ba543ad51e19726b6eed43f3 and 9553437865c11cd3b39569dcc2ee1295f8413cbf

Changed Files

File Additions Deletions Status
unit/test-eir.c +15 -1 modified

Full Patch

diff --git a/unit/test-eir.c b/unit/test-eir.c
index 6a90eb3..cc61090 100644
--- a/unit/test-eir.c
+++ b/unit/test-eir.c
@@ -40,6 +40,7 @@ struct test_data {
 	const char *name;
 	gboolean name_complete;
 	int8_t tx_power;
+	const char **uuid;
 };
 
 static const unsigned char macbookair_data[] = {
@@ -470,7 +471,7 @@ static void test_parsing(gconstpointer data)
 	g_assert(eir.flags == test->flags);
 
 	if (test->name) {
-		g_assert(g_str_equal(eir.name, test->name) == TRUE);
+		g_assert_cmpstr(eir.name, ==, test->name);
 		g_assert(eir.name_complete == test->name_complete);
 	} else {
 		g_assert(eir.name == NULL);
@@ -478,6 +479,19 @@ static void test_parsing(gconstpointer data)
 
 	g_assert(eir.tx_power == test->tx_power);
 
+	if (test->uuid) {
+		GSList *list;
+		int n = 0;
+
+		for (list = eir.services; list; list = list->next, n++) {
+			char *uuid_str = list->data;
+			g_assert(test->uuid[n]);
+			g_assert_cmpstr(test->uuid[n], ==, uuid_str);
+		}
+	} else {
+		g_assert(eir.services == NULL);
+	}
+
 	eir_data_free(&eir);
 }