* FYI: New AccessibleContext test
@ 2006-03-13 15:10 Roman Kennke
0 siblings, 0 replies; only message in thread
From: Roman Kennke @ 2006-03-13 15:10 UTC (permalink / raw)
To: mauve-patches
[-- Attachment #1: Type: text/plain, Size: 441 bytes --]
I added a test for AccessibleContext that demonstrates a problem that we
have in Classpath that shows up in the SwingSet2 demo from JDK1.5.
2006-03-13 Roman Kennke <kennke@aicas.com>
*
gnu/testlet/javax/accessibility/AccessibleContext/TestAccessibleContext.java:
New auxiliary helper class.
*
gnu/testlet/javax/accessibility/AccessibleContext/getAccessibleRelationSet.java:
New test.
/Roman
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch.diff --]
[-- Type: text/x-patch; name="patch.diff", Size: 4348 bytes --]
Index: gnu/testlet/javax/accessibility/AccessibleContext/TestAccessibleContext.java
===================================================================
RCS file: gnu/testlet/javax/accessibility/AccessibleContext/TestAccessibleContext.java
diff -N gnu/testlet/javax/accessibility/AccessibleContext/TestAccessibleContext.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/accessibility/AccessibleContext/TestAccessibleContext.java 13 Mar 2006 15:06:42 -0000
@@ -0,0 +1,71 @@
+/* TestAccessibleContext.java -- An AccessibleContext implementation for testing
+ Copyright (C) 2006 Roman Kennke (kennke@aicas.com)
+This file is part of Mauve.
+
+Mauve is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+Mauve is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Mauve; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+*/
+
+// Tags: not-a-test
+
+package gnu.testlet.javax.accessibility.AccessibleContext;
+
+import java.util.Locale;
+
+import javax.accessibility.Accessible;
+import javax.accessibility.AccessibleContext;
+import javax.accessibility.AccessibleRole;
+import javax.accessibility.AccessibleStateSet;
+
+/**
+ * A concrete subclass of AccessibleContext for testing.
+ *
+ * @author Roman Kennke (kennke@aicas.com)
+ */
+public class TestAccessibleContext extends AccessibleContext
+{
+
+ public AccessibleRole getAccessibleRole()
+ {
+ return null;
+ }
+
+ public AccessibleStateSet getAccessibleStateSet()
+ {
+ return null;
+ }
+
+ public int getAccessibleIndexInParent()
+ {
+ return 0;
+ }
+
+ public int getAccessibleChildrenCount()
+ {
+ return 0;
+ }
+
+ public Accessible getAccessibleChild(int i)
+ {
+ return null;
+ }
+
+ public Locale getLocale()
+ {
+ return null;
+ }
+
+}
Index: gnu/testlet/javax/accessibility/AccessibleContext/getAccessibleRelationSet.java
===================================================================
RCS file: gnu/testlet/javax/accessibility/AccessibleContext/getAccessibleRelationSet.java
diff -N gnu/testlet/javax/accessibility/AccessibleContext/getAccessibleRelationSet.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/accessibility/AccessibleContext/getAccessibleRelationSet.java 13 Mar 2006 15:06:42 -0000
@@ -0,0 +1,52 @@
+/* getAccessibleRelationSet.java -- Tests the getAccesibleRelationSet method
+ Copyright (C) 2006 Roman Kennke (kennke@aicas.com)
+This file is part of Mauve.
+
+Mauve is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+Mauve is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Mauve; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+*/
+
+// Tags: JDK1.2
+// Uses: TestAccessibleContext
+
+package gnu.testlet.javax.accessibility.AccessibleContext;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+/**
+ * Tests the default implementation of
+ * AccessibleContext.getAccessibleRelationSet().
+ *
+ * @author Roman Kennke (kennke@aicas.com)
+ *
+ */
+public class getAccessibleRelationSet implements Testlet
+{
+
+ /**
+ * The entry point in that class.
+ *
+ * @param harness the test harness to use
+ */
+ public void test(TestHarness harness)
+ {
+ TestAccessibleContext ctx = new TestAccessibleContext();
+ harness.check(ctx.getAccessibleRelationSet() != null);
+ harness.check(ctx.getAccessibleRelationSet().size(), 0);
+ }
+
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-03-13 15:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-13 15:10 FYI: New AccessibleContext test Roman Kennke
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).