2008-08-18 Mark Doffman <mark.doffman@codethink.co.uk>
authorMark Doffman <mdoff@silver-wind.(none)>
Mon, 18 Aug 2008 16:21:31 +0000 (17:21 +0100)
committerMark Doffman <mdoff@silver-wind.(none)>
Mon, 18 Aug 2008 16:21:31 +0000 (17:21 +0100)
* configure.ac
Add tests/data folder

* tests/
Rename the accessible test app and the associated
data *.xml

configure.ac
tests/Makefile.am
tests/apps/Makefile.am
tests/apps/accessible-app.c [moved from tests/apps/object-app.c with 93% similarity]
tests/data/Makefile.am [new file with mode: 0644]
tests/data/accessible-test-results.xml [moved from tests/data/object-test-stage1-results.xml with 100% similarity]
tests/data/accessible-test.xml [moved from tests/data/object-test-stage1.xml with 100% similarity]
tests/pyatspi/accessibletest.py

index f50d584..371c33f 100644 (file)
@@ -191,6 +191,7 @@ AC_CONFIG_FILES([Makefile
                 login-helper/Makefile
                 tests/dummyatk/Makefile
                 tests/cspi/Makefile
+                tests/data/Makefile
                 tests/pyatspi/Makefile
                 tests/pyatspi/pasytest/Makefile
                 tests/apps/Makefile
index 4a6d94f..239fd4b 100644 (file)
@@ -1,4 +1,4 @@
-SUBDIRS = dummyatk apps cspi pyatspi
+SUBDIRS = dummyatk apps data cspi pyatspi
 
 #TESTS=testrunner.py
 TESTS_ENVIRONMENT = PYTHONPATH=$(abs_top_srcdir)/python                                        \
index 9d13218..c058f82 100644 (file)
@@ -1,5 +1,5 @@
 check_PROGRAMS = test-application
-check_LTLIBRARIES = libnoopapp.la libobjectapp.la libcomponentapp.la
+check_LTLIBRARIES = libnoopapp.la libaccessibleapp.la libcomponentapp.la
 
 test_application_CFLAGS = $(DBUS_GLIB_CFLAGS)  \
                          $(ATK_CFLAGS)         \
@@ -22,10 +22,10 @@ libnoopapp_la_LDFLAGS = $(TEST_APP_LDFLAGS)
 libnoopapp_la_LIBADD = $(TEST_APP_LIBADD)
 libnoopapp_la_SOURCES = noop-app.c
 
-libobjectapp_la_CFLAGS = $(TEST_APP_CFLAGS) $(LIB_XML_CFLAGS)
-libobjectapp_la_LDFLAGS = $(TEST_APP_LDFLAGS)
-libobjectapp_la_LIBADD = $(TEST_APP_LIBADD) $(LIB_XML_LIBS)
-libobjectapp_la_SOURCES = object-app.c atk-object-xml-loader.c atk-object-xml-loader.h
+libaccessibleapp_la_CFLAGS = $(TEST_APP_CFLAGS) $(LIB_XML_CFLAGS)
+libaccessibleapp_la_LDFLAGS = $(TEST_APP_LDFLAGS)
+libaccessibleapp_la_LIBADD = $(TEST_APP_LIBADD) $(LIB_XML_LIBS)
+libaccessibleapp_la_SOURCES = accessible-app.c atk-object-xml-loader.c atk-object-xml-loader.h
 
 libcomponentapp_la_CFLAGS = $(TEST_APP_CFLAGS)
 libcomponentapp_la_LDFLAGS = $(TEST_APP_LDFLAGS)
similarity index 93%
rename from tests/apps/object-app.c
rename to tests/apps/accessible-app.c
index 35f1cab..408759b 100644 (file)
@@ -8,7 +8,7 @@ static gchar *tdata_path = NULL;
 
 static AtkObject *root_accessible;
 
-#define OBJECT_TEST_1 "object-test-stage1.xml"
+#define OBJECT_TEST_1 "accessible-test.xml"
 
 G_MODULE_EXPORT void
 test_init (gchar *path)
diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
new file mode 100644 (file)
index 0000000..b06736b
--- /dev/null
@@ -0,0 +1,3 @@
+EXTRA_DIST = \
+       accessible-test.xml\
+       accessible-test-results.xml
index a504cca..bd95ba6 100644 (file)
@@ -98,7 +98,9 @@ class AccessibleTest(_PasyTest):
 
 
        def test_getAttributes(self, test):
-               pass
+               root = self._cache.root
+               #TODO The AttributeSet test needs expanding. Check attributes are passed correctly.
+               attr = root.getAttributes()
 
        def test_parent(self, test):
                root = self._cache.root
@@ -131,7 +133,9 @@ class AccessibleTest(_PasyTest):
                                 "Expected LocalizedRoleName - \"%s\". Recieved - \"%s\"" % (ans, res,))
 
        def test_getRelationSet(self, test):
-               pass
+               root = self._cache.root
+               # Complete test of Relation interface is separate
+               rset = root.getRelationSet()
 
        def test_getRole(self, test):
                root = self._cache.root
@@ -192,7 +196,7 @@ class AccessibleTest(_PasyTest):
                answer = doc.toprettyxml()
 
                correct = os.path.join(os.environ["TEST_DATA_DIRECTORY"],
-                                       "object-test-stage1-results.xml")
+                                       "accessible-test-results.xml")
                file = open(correct)
                cstring = file.read()