[gupnp] tests: Make test-bugs naming generic



commit 7d89cbb667093acd30fa73b0a2db613f4d03ca94
Author: Jussi Kukkonen <jussi kukkonen intel com>
Date:   Sat Jan 18 17:17:59 2014 +0200

    tests: Make test-bugs naming generic

 tests/gtest/data/TestBgo696762.xml                 |   21 --------------------
 tests/gtest/data/TestDevice.xml                    |   21 ++++++++++++++++++++
 .../data/{ServiceBgo69762.xml => TestService.xml}  |    0
 tests/gtest/test-bugs.c                            |   12 +++++-----
 4 files changed, 27 insertions(+), 27 deletions(-)
---
diff --git a/tests/gtest/data/TestDevice.xml b/tests/gtest/data/TestDevice.xml
new file mode 100644
index 0000000..87f3d87
--- /dev/null
+++ b/tests/gtest/data/TestDevice.xml
@@ -0,0 +1,21 @@
+<root xmlns="urn:schemas-upnp-org:device-1-0">
+<specVersion>
+<major>1</major>
+<minor>0</minor>
+</specVersion>
+<device>
+<deviceType>urn:test-gupnp-org:device:TestDevice:1</deviceType>
+<friendlyName>GUPnP Regression Test Device</friendlyName>
+<modelURL>http://gupnp.org/</modelURL>
+<UDN>uuid:1234</UDN>
+<serviceList>
+<service>
+<serviceType>urn:test-gupnp-org:service:TestService:1</serviceType>
+<serviceId>urn:test-gupnp-org:serviceId:TestService:1</serviceId>
+<SCPDURL>/TestService.xml</SCPDURL>
+<controlURL>/TestService/Control</controlURL>
+<eventSubURL>/TestService/Event</eventSubURL>
+</service>
+</serviceList>
+</device>
+</root>
diff --git a/tests/gtest/data/ServiceBgo69762.xml b/tests/gtest/data/TestService.xml
similarity index 100%
rename from tests/gtest/data/ServiceBgo69762.xml
rename to tests/gtest/data/TestService.xml
diff --git a/tests/gtest/test-bugs.c b/tests/gtest/test-bugs.c
index 7161e63..c5c7e0b 100644
--- a/tests/gtest/test-bugs.c
+++ b/tests/gtest/test-bugs.c
@@ -104,7 +104,7 @@ test_bgo_696762_on_sp_available (G_GNUC_UNUSED GUPnPControlPoint *cp,
 }
 
 static gboolean
-test_bgo_696762_on_timeout (G_GNUC_UNUSED gpointer user_data)
+test_on_timeout (G_GNUC_UNUSED gpointer user_data)
 {
     g_assert_not_reached ();
 
@@ -130,7 +130,7 @@ test_bgo_696762 (void)
     g_assert (error == NULL);
 
     cp = gupnp_control_point_new (context,
-                                  "urn:test-gupnp-org:service:bgo696762:1");
+                                  "urn:test-gupnp-org:service:TestService:1");
 
     gssdp_resource_browser_set_active (GSSDP_RESOURCE_BROWSER (cp), TRUE);
 
@@ -140,16 +140,16 @@ test_bgo_696762 (void)
                       &data);
 
 
-    rd = gupnp_root_device_new (context, "TestBgo696762.xml", DATA_PATH);
+    rd = gupnp_root_device_new (context, "TestDevice.xml", DATA_PATH);
     gupnp_root_device_set_available (rd, TRUE);
     info = gupnp_device_info_get_service (GUPNP_DEVICE_INFO (rd),
-                                          "urn:test-gupnp-org:service:bgo696762:1");
+                                          "urn:test-gupnp-org:service:TestService:1");
     g_signal_connect (G_OBJECT (info),
                       "action-invoked::Browse",
                       G_CALLBACK (test_bgo_696762_on_browse_call),
                       &data);
 
-    timeout_id = g_timeout_add_seconds (2, test_bgo_696762_on_timeout, &(data.loop));
+    timeout_id = g_timeout_add_seconds (2, test_on_timeout, &(data.loop));
     g_main_loop_run (data.loop);
     g_source_remove (timeout_id);
     g_assert (data.proxy != NULL);
@@ -166,7 +166,7 @@ test_bgo_696762 (void)
                                       "SortCriteria", G_TYPE_STRING, "",
                                       NULL);
 
-    timeout_id = g_timeout_add_seconds (2, test_bgo_696762_on_timeout, &(data.loop));
+    timeout_id = g_timeout_add_seconds (2, test_on_timeout, &(data.loop));
     g_main_loop_run (data.loop);
     g_source_remove (timeout_id);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]