summary refs log tree commit diff
path: root/libnm-core/tests/test-general.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnm-core/tests/test-general.c')
-rw-r--r--libnm-core/tests/test-general.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libnm-core/tests/test-general.c b/libnm-core/tests/test-general.c
index 601e3edc..13fed902 100644
--- a/libnm-core/tests/test-general.c
+++ b/libnm-core/tests/test-general.c
@@ -3964,6 +3964,16 @@ test_hwaddr_equal (void)
 	g_assert (nm_utils_hwaddr_matches (null_binary, sizeof (null_binary), null_string, -1));
 	g_assert (nm_utils_hwaddr_matches (null_binary, sizeof (null_binary), null_binary, sizeof (null_binary)));
 	g_assert (nm_utils_hwaddr_matches (null_binary, sizeof (null_binary), NULL, ETH_ALEN));
+
+	g_assert (nm_utils_hwaddr_matches (NULL, -1, NULL, -1));
+	g_assert (!nm_utils_hwaddr_matches (NULL, -1, string, -1));
+	g_assert (!nm_utils_hwaddr_matches (string, -1, NULL, -1));
+	g_assert (!nm_utils_hwaddr_matches (NULL, -1, null_string, -1));
+	g_assert (!nm_utils_hwaddr_matches (null_string, -1, NULL, -1));
+	g_assert (!nm_utils_hwaddr_matches (NULL, -1, binary, sizeof (binary)));
+	g_assert (!nm_utils_hwaddr_matches (binary, sizeof (binary), NULL, -1));
+	g_assert (!nm_utils_hwaddr_matches (NULL, -1, null_binary, sizeof (null_binary)));
+	g_assert (!nm_utils_hwaddr_matches (null_binary, sizeof (null_binary), NULL, -1));
 }
 
 static void