This is the mail archive of the
mauve-patches@sourceware.org
mailing list for the Mauve project.
FYI: FileView tests
- From: David Gilbert <david dot gilbert at object-refinery dot com>
- To: mauve-patches at sources dot redhat dot com
- Date: Mon, 19 Sep 2005 21:24:31 +0000
- Subject: FYI: FileView tests
These tests just confirm that the methods in FileView all return null:
2005-09-19 David Gilbert <david.gilbert@object-refinery.com>
* gnu/testlet/javax/swing/filechooser/FileView/getDescription.java: new test,
* gnu/testlet/javax/swing/filechooser/FileView/getIcon.java: new test,
* gnu/testlet/javax/swing/filechooser/FileView/getName.java: new test,
* gnu/testlet/javax/swing/filechooser/FileView/getTypeDescription.java: new test,
* gnu/testlet/javax/swing/filechooser/FileView/isTraversable.java: new test,
* gnu/testlet/javax/swing/filechooser/FileView/MyFileView.java: new support class.
Regards,
Dave Gilbert
Index: gnu/testlet/javax/swing/filechooser/FileView/MyFileView.java
===================================================================
RCS file: gnu/testlet/javax/swing/filechooser/FileView/MyFileView.java
diff -N gnu/testlet/javax/swing/filechooser/FileView/MyFileView.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/filechooser/FileView/MyFileView.java 19 Sep 2005 20:19:44 -0000
@@ -0,0 +1,33 @@
+// Tags: not-a-test
+
+// Copyright (C) 2005 David Gilbert <david.gilbert@object-refinery.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.
+
+
+package gnu.testlet.javax.swing.filechooser.FileView;
+
+import javax.swing.filechooser.FileView;
+
+/**
+ * For testing the default methods in FileView.
+ */
+public class MyFileView extends FileView
+{
+
+}
Index: gnu/testlet/javax/swing/filechooser/FileView/getDescription.java
===================================================================
RCS file: gnu/testlet/javax/swing/filechooser/FileView/getDescription.java
diff -N gnu/testlet/javax/swing/filechooser/FileView/getDescription.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/filechooser/FileView/getDescription.java 19 Sep 2005 20:19:44 -0000
@@ -0,0 +1,51 @@
+// Tags: JDK1.2
+
+// Copyright (C) 2005 David Gilbert <david.gilbert@object-refinery.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.
+
+
+package gnu.testlet.javax.swing.filechooser.FileView;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.io.File;
+
+import javax.swing.filechooser.FileView;
+
+/**
+ * Some checks for the getDescription() method in the {@link FileView} class.
+ */
+public class getDescription implements Testlet
+{
+
+ /**
+ * Runs the test using the specified harness.
+ *
+ * @param harness the test harness (<code>null</code> not permitted).
+ */
+ public void test(TestHarness harness)
+ {
+ MyFileView fv = new MyFileView();
+ File f = new File("File1.txt");
+ harness.check(fv.getDescription(f), null);
+ harness.check(fv.getDescription(null), null);
+ }
+
+}
Index: gnu/testlet/javax/swing/filechooser/FileView/getIcon.java
===================================================================
RCS file: gnu/testlet/javax/swing/filechooser/FileView/getIcon.java
diff -N gnu/testlet/javax/swing/filechooser/FileView/getIcon.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/filechooser/FileView/getIcon.java 19 Sep 2005 20:19:44 -0000
@@ -0,0 +1,51 @@
+// Tags: JDK1.2
+
+// Copyright (C) 2005 David Gilbert <david.gilbert@object-refinery.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.
+
+
+package gnu.testlet.javax.swing.filechooser.FileView;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.io.File;
+
+import javax.swing.filechooser.FileView;
+
+/**
+ * Some checks for the getIcon() method in the {@link FileView} class.
+ */
+public class getIcon implements Testlet
+{
+
+ /**
+ * Runs the test using the specified harness.
+ *
+ * @param harness the test harness (<code>null</code> not permitted).
+ */
+ public void test(TestHarness harness)
+ {
+ MyFileView fv = new MyFileView();
+ File f = new File("File1.txt");
+ harness.check(fv.getIcon(f), null);
+ harness.check(fv.getIcon(null), null);
+ }
+
+}
Index: gnu/testlet/javax/swing/filechooser/FileView/getName.java
===================================================================
RCS file: gnu/testlet/javax/swing/filechooser/FileView/getName.java
diff -N gnu/testlet/javax/swing/filechooser/FileView/getName.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/filechooser/FileView/getName.java 19 Sep 2005 20:19:44 -0000
@@ -0,0 +1,51 @@
+// Tags: JDK1.2
+
+// Copyright (C) 2005 David Gilbert <david.gilbert@object-refinery.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.
+
+
+package gnu.testlet.javax.swing.filechooser.FileView;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.io.File;
+
+import javax.swing.filechooser.FileView;
+
+/**
+ * Some checks for the getName() method in the {@link FileView} class.
+ */
+public class getName implements Testlet
+{
+
+ /**
+ * Runs the test using the specified harness.
+ *
+ * @param harness the test harness (<code>null</code> not permitted).
+ */
+ public void test(TestHarness harness)
+ {
+ MyFileView fv = new MyFileView();
+ File f = new File("File1.txt");
+ harness.check(fv.getName(f), null);
+ harness.check(fv.getName(null), null);
+ }
+
+}
Index: gnu/testlet/javax/swing/filechooser/FileView/getTypeDescription.java
===================================================================
RCS file: gnu/testlet/javax/swing/filechooser/FileView/getTypeDescription.java
diff -N gnu/testlet/javax/swing/filechooser/FileView/getTypeDescription.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/filechooser/FileView/getTypeDescription.java 19 Sep 2005 20:19:44 -0000
@@ -0,0 +1,52 @@
+// Tags: JDK1.2
+
+// Copyright (C) 2005 David Gilbert <david.gilbert@object-refinery.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.
+
+
+package gnu.testlet.javax.swing.filechooser.FileView;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.io.File;
+
+import javax.swing.filechooser.FileView;
+
+/**
+ * Some checks for the getTypeDescription() method in the {@link FileView}
+ * class.
+ */
+public class getTypeDescription implements Testlet
+{
+
+ /**
+ * Runs the test using the specified harness.
+ *
+ * @param harness the test harness (<code>null</code> not permitted).
+ */
+ public void test(TestHarness harness)
+ {
+ MyFileView fv = new MyFileView();
+ File f = new File("File1.txt");
+ harness.check(fv.getTypeDescription(f), null);
+ harness.check(fv.getTypeDescription(null), null);
+ }
+
+}
Index: gnu/testlet/javax/swing/filechooser/FileView/isTraversable.java
===================================================================
RCS file: gnu/testlet/javax/swing/filechooser/FileView/isTraversable.java
diff -N gnu/testlet/javax/swing/filechooser/FileView/isTraversable.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/filechooser/FileView/isTraversable.java 19 Sep 2005 20:19:44 -0000
@@ -0,0 +1,51 @@
+// Tags: JDK1.2
+
+// Copyright (C) 2005 David Gilbert <david.gilbert@object-refinery.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.
+
+
+package gnu.testlet.javax.swing.filechooser.FileView;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.io.File;
+
+import javax.swing.filechooser.FileView;
+
+/**
+ * Some checks for the isTraversable() method in the {@link FileView} class.
+ */
+public class isTraversable implements Testlet
+{
+
+ /**
+ * Runs the test using the specified harness.
+ *
+ * @param harness the test harness (<code>null</code> not permitted).
+ */
+ public void test(TestHarness harness)
+ {
+ MyFileView fv = new MyFileView();
+ File f = new File("File1.txt");
+ harness.check(fv.isTraversable(f), null);
+ harness.check(fv.isTraversable(null), null);
+ }
+
+}