This is the mail archive of the mauve-patches@sourceware.org mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: New AccessibleContext test


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
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);
+  }
+
+}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]