diff options
author | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2010-01-18 19:08:05 -0500 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.co.uk> | 2010-01-18 19:08:05 -0500 |
commit | 9ab882c184bd62798b50955b5b8c1c9844356dbe (patch) | |
tree | 10900d351be0e19a6c24de56d64989c76db75115 /tests | |
parent | fb86148ce78152ad6321f44e870616d451704257 (diff) | |
download | gupnp-igd-9ab882c184bd62798b50955b5b8c1c9844356dbe.tar.gz |
Add test for empty ip address
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gtest/gupnp-simple-igd.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/gtest/gupnp-simple-igd.c b/tests/gtest/gupnp-simple-igd.c index d969dda..df86902 100644 --- a/tests/gtest/gupnp-simple-igd.c +++ b/tests/gtest/gupnp-simple-igd.c @@ -396,6 +396,16 @@ test_gupnp_simple_igd_invalid_ip(void) invalid_ip = NULL; g_object_unref (igd); } +static void +test_gupnp_simple_igd_empty_ip(void) +{ + GUPnPSimpleIgd *igd = gupnp_simple_igd_new (NULL); + + invalid_ip = ""; + run_gupnp_simple_igd_test (NULL, igd, INTERNAL_PORT); + invalid_ip = NULL; + g_object_unref (igd); +} int main (int argc, char **argv) @@ -418,6 +428,8 @@ int main (int argc, char **argv) test_gupnp_simple_igd_dispose_removes_thread); g_test_add_func ("/simpleigd/invalid_ip", test_gupnp_simple_igd_invalid_ip); + g_test_add_func ("/simpleigd/empty_ip", + test_gupnp_simple_igd_empty_ip); g_test_run (); |