Initial revision
From-SVN: r102074
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Makefile.in
|
||||
@@ -0,0 +1,57 @@
|
||||
/* Fail.java -- Result code returned when test failed but was expected to
|
||||
Copyright (c) 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
GNU Classpath 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.
|
||||
|
||||
GNU Classpath 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 GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
02110-1301 USA.
|
||||
|
||||
Linking this library statically or dynamically with other modules is
|
||||
making a combined work based on this library. Thus, the terms and
|
||||
conditions of the GNU General Public License cover the whole
|
||||
combination.
|
||||
|
||||
As a special exception, the copyright holders of this library give you
|
||||
permission to link this library with independent modules to produce an
|
||||
executable, regardless of the license terms of these independent
|
||||
modules, and to copy and distribute the resulting executable under
|
||||
terms of your choice, provided that you also meet, for each linked
|
||||
independent module, the terms and conditions of the license of that
|
||||
module. An independent module is a module which is not derived from
|
||||
or based on this library. If you modify this library, you may extend
|
||||
this exception to your version of the library, but you are not
|
||||
obligated to do so. If you do not wish to do so, delete this
|
||||
exception statement from your version. */
|
||||
|
||||
package gnu.test;
|
||||
|
||||
/**
|
||||
* Test failed but was expected to pass.
|
||||
*/
|
||||
public class Fail extends Result
|
||||
{
|
||||
/**
|
||||
* Constructs a Fail result code with additional information.
|
||||
*/
|
||||
public Fail(String msg) {
|
||||
super("FAIL", msg);
|
||||
}
|
||||
/**
|
||||
* Constructs a Fail result code.
|
||||
*/
|
||||
public Fail() {
|
||||
this("");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
## Input file for automake to generate the Makefile.in used by configure
|
||||
|
||||
##gnutestdir = $(datadir)/gnu/test/
|
||||
|
||||
##gnutest_JAVA = Fail.java Test.java Untested.java Pass.java Unresolved.java XFail.java Result.java Unsupported.java XPass.java
|
||||
@@ -0,0 +1,57 @@
|
||||
/* Pass.java -- Result code returned when test passed and was excepted to
|
||||
Copyright (c) 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
GNU Classpath 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.
|
||||
|
||||
GNU Classpath 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 GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
02110-1301 USA.
|
||||
|
||||
Linking this library statically or dynamically with other modules is
|
||||
making a combined work based on this library. Thus, the terms and
|
||||
conditions of the GNU General Public License cover the whole
|
||||
combination.
|
||||
|
||||
As a special exception, the copyright holders of this library give you
|
||||
permission to link this library with independent modules to produce an
|
||||
executable, regardless of the license terms of these independent
|
||||
modules, and to copy and distribute the resulting executable under
|
||||
terms of your choice, provided that you also meet, for each linked
|
||||
independent module, the terms and conditions of the license of that
|
||||
module. An independent module is a module which is not derived from
|
||||
or based on this library. If you modify this library, you may extend
|
||||
this exception to your version of the library, but you are not
|
||||
obligated to do so. If you do not wish to do so, delete this
|
||||
exception statement from your version. */
|
||||
|
||||
package gnu.test;
|
||||
|
||||
/**
|
||||
* Test passed and was excepted to pass.
|
||||
*/
|
||||
public class Pass extends Result
|
||||
{
|
||||
/**
|
||||
* Constructs a Pass result code with additional information.
|
||||
*/
|
||||
public Pass(String msg) {
|
||||
super("PASS", msg);
|
||||
}
|
||||
/**
|
||||
* Constructs a Pass result code.
|
||||
*/
|
||||
public Pass() {
|
||||
this("");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
/* Result.java -- Abstract base class for all Result types.
|
||||
Copyright (c) 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
GNU Classpath 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.
|
||||
|
||||
GNU Classpath 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 GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
02110-1301 USA.
|
||||
|
||||
Linking this library statically or dynamically with other modules is
|
||||
making a combined work based on this library. Thus, the terms and
|
||||
conditions of the GNU General Public License cover the whole
|
||||
combination.
|
||||
|
||||
As a special exception, the copyright holders of this library give you
|
||||
permission to link this library with independent modules to produce an
|
||||
executable, regardless of the license terms of these independent
|
||||
modules, and to copy and distribute the resulting executable under
|
||||
terms of your choice, provided that you also meet, for each linked
|
||||
independent module, the terms and conditions of the license of that
|
||||
module. An independent module is a module which is not derived from
|
||||
or based on this library. If you modify this library, you may extend
|
||||
this exception to your version of the library, but you are not
|
||||
obligated to do so. If you do not wish to do so, delete this
|
||||
exception statement from your version. */
|
||||
|
||||
package gnu.test;
|
||||
|
||||
/**
|
||||
* Class which all usable Result objects extend.
|
||||
*/
|
||||
public abstract class Result
|
||||
{
|
||||
String name, msg;
|
||||
|
||||
/**
|
||||
* Create a result of a given type, with a given message.
|
||||
*
|
||||
* @param name name of type
|
||||
* @param msg message
|
||||
*/
|
||||
public Result(String name, String msg) {
|
||||
this.name = name;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a result of a given type.
|
||||
*
|
||||
* @param name name of type
|
||||
*/
|
||||
public Result(String name) {
|
||||
this(name, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the type.
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the message associated with this instance of Result, or
|
||||
* the empty string if no message exists.
|
||||
*/
|
||||
public String getMsg() {
|
||||
return (msg != null) ? msg : "";
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return getName() + ":" + getMsg();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
/* Test.java -- Interface representing a single test.
|
||||
Copyright (c) 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
GNU Classpath 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.
|
||||
|
||||
GNU Classpath 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 GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
02110-1301 USA.
|
||||
|
||||
Linking this library statically or dynamically with other modules is
|
||||
making a combined work based on this library. Thus, the terms and
|
||||
conditions of the GNU General Public License cover the whole
|
||||
combination.
|
||||
|
||||
As a special exception, the copyright holders of this library give you
|
||||
permission to link this library with independent modules to produce an
|
||||
executable, regardless of the license terms of these independent
|
||||
modules, and to copy and distribute the resulting executable under
|
||||
terms of your choice, provided that you also meet, for each linked
|
||||
independent module, the terms and conditions of the license of that
|
||||
module. An independent module is a module which is not derived from
|
||||
or based on this library. If you modify this library, you may extend
|
||||
this exception to your version of the library, but you are not
|
||||
obligated to do so. If you do not wish to do so, delete this
|
||||
exception statement from your version. */
|
||||
|
||||
package gnu.test;
|
||||
|
||||
/**
|
||||
* Interface which all GNU Classpath tests must implement.
|
||||
* The method <code>test</code> is invoked once for each test.
|
||||
*/
|
||||
public interface Test
|
||||
{
|
||||
/**
|
||||
* Returns the name of the test.
|
||||
*/
|
||||
public String getName();
|
||||
|
||||
/**
|
||||
* Performs a test.
|
||||
*
|
||||
* @return result from running the test
|
||||
*/
|
||||
public Result test();
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
/* Unresolved.java - Result code returned when test gives indeterminate results.
|
||||
Copyright (c) 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
GNU Classpath 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.
|
||||
|
||||
GNU Classpath 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 GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
02110-1301 USA.
|
||||
|
||||
Linking this library statically or dynamically with other modules is
|
||||
making a combined work based on this library. Thus, the terms and
|
||||
conditions of the GNU General Public License cover the whole
|
||||
combination.
|
||||
|
||||
As a special exception, the copyright holders of this library give you
|
||||
permission to link this library with independent modules to produce an
|
||||
executable, regardless of the license terms of these independent
|
||||
modules, and to copy and distribute the resulting executable under
|
||||
terms of your choice, provided that you also meet, for each linked
|
||||
independent module, the terms and conditions of the license of that
|
||||
module. An independent module is a module which is not derived from
|
||||
or based on this library. If you modify this library, you may extend
|
||||
this exception to your version of the library, but you are not
|
||||
obligated to do so. If you do not wish to do so, delete this
|
||||
exception statement from your version. */
|
||||
|
||||
package gnu.test;
|
||||
|
||||
/**
|
||||
* Test produced indeterminate results.
|
||||
*/
|
||||
public class Unresolved extends Result
|
||||
{
|
||||
/**
|
||||
* Constructs an Unresolved result code with additional information.
|
||||
*/
|
||||
public Unresolved(String msg) {
|
||||
super("UNRESOLVED", msg);
|
||||
}
|
||||
/**
|
||||
* Constructs an Unresolved result code.
|
||||
*/
|
||||
public Unresolved() {
|
||||
this("");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
/* Unsupported.java -- Result code returned when test does not have the
|
||||
Copyright (c) 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
GNU Classpath 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.
|
||||
|
||||
GNU Classpath 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 GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
02110-1301 USA.
|
||||
|
||||
Linking this library statically or dynamically with other modules is
|
||||
making a combined work based on this library. Thus, the terms and
|
||||
conditions of the GNU General Public License cover the whole
|
||||
combination.
|
||||
|
||||
As a special exception, the copyright holders of this library give you
|
||||
permission to link this library with independent modules to produce an
|
||||
executable, regardless of the license terms of these independent
|
||||
modules, and to copy and distribute the resulting executable under
|
||||
terms of your choice, provided that you also meet, for each linked
|
||||
independent module, the terms and conditions of the license of that
|
||||
module. An independent module is a module which is not derived from
|
||||
or based on this library. If you modify this library, you may extend
|
||||
this exception to your version of the library, but you are not
|
||||
obligated to do so. If you do not wish to do so, delete this
|
||||
exception statement from your version. */
|
||||
|
||||
package gnu.test;
|
||||
|
||||
/**
|
||||
* Test does not have the required support to run. For example,
|
||||
* Unsupported could be returned when a needed resource
|
||||
* (ie. multicasting) is not available.
|
||||
*/
|
||||
public class Unsupported extends Result
|
||||
{
|
||||
/**
|
||||
* Constructs an Unsupported result code with additional information.
|
||||
*/
|
||||
public Unsupported(String msg) {
|
||||
super("UNSUPPORTED", msg);
|
||||
}
|
||||
/**
|
||||
* Constructs an Unsupported result code.
|
||||
*/
|
||||
public Unsupported() {
|
||||
this("");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
/* Untested.java -- Result code returned when test was not run -- placeholder.
|
||||
Copyright (c) 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
GNU Classpath 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.
|
||||
|
||||
GNU Classpath 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 GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
02110-1301 USA.
|
||||
|
||||
Linking this library statically or dynamically with other modules is
|
||||
making a combined work based on this library. Thus, the terms and
|
||||
conditions of the GNU General Public License cover the whole
|
||||
combination.
|
||||
|
||||
As a special exception, the copyright holders of this library give you
|
||||
permission to link this library with independent modules to produce an
|
||||
executable, regardless of the license terms of these independent
|
||||
modules, and to copy and distribute the resulting executable under
|
||||
terms of your choice, provided that you also meet, for each linked
|
||||
independent module, the terms and conditions of the license of that
|
||||
module. An independent module is a module which is not derived from
|
||||
or based on this library. If you modify this library, you may extend
|
||||
this exception to your version of the library, but you are not
|
||||
obligated to do so. If you do not wish to do so, delete this
|
||||
exception statement from your version. */
|
||||
|
||||
package gnu.test;
|
||||
|
||||
/**
|
||||
* Test was not run -- a placeholder.
|
||||
*/
|
||||
public class Untested extends Result
|
||||
{
|
||||
/**
|
||||
* Constructs an Untested result code with additional information.
|
||||
*/
|
||||
public Untested(String msg) {
|
||||
super("UNTESTED", msg);
|
||||
}
|
||||
/**
|
||||
* Constructs an Untested result code.
|
||||
*/
|
||||
public Untested() {
|
||||
this("");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
/* XFail.java - Result code returned when test failed and was expected to fail.
|
||||
Copyright (c) 1998 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
GNU Classpath 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.
|
||||
|
||||
GNU Classpath 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 GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
02110-1301 USA.
|
||||
|
||||
Linking this library statically or dynamically with other modules is
|
||||
making a combined work based on this library. Thus, the terms and
|
||||
conditions of the GNU General Public License cover the whole
|
||||
combination.
|
||||
|
||||
As a special exception, the copyright holders of this library give you
|
||||
permission to link this library with independent modules to produce an
|
||||
executable, regardless of the license terms of these independent
|
||||
modules, and to copy and distribute the resulting executable under
|
||||
terms of your choice, provided that you also meet, for each linked
|
||||
independent module, the terms and conditions of the license of that
|
||||
module. An independent module is a module which is not derived from
|
||||
or based on this library. If you modify this library, you may extend
|
||||
this exception to your version of the library, but you are not
|
||||
obligated to do so. If you do not wish to do so, delete this
|
||||
exception statement from your version. */
|
||||
|
||||
package gnu.test;
|
||||
|
||||
/**
|
||||
* Test failed and was expected to fail.
|
||||
*/
|
||||
public class XFail extends Result
|
||||
{
|
||||
/**
|
||||
* Constructs an XFail result code with additional information.
|
||||
*/
|
||||
public XFail(String msg) {
|
||||
super("XFAIL", msg);
|
||||
}
|
||||
/**
|
||||
* Constructs an XFail result code.
|
||||
*/
|
||||
public XFail() {
|
||||
this("");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
/* XPass.java - Result code returned when test passed but was expected to fail.
|
||||
Copyright (c) 1998 Free Software Foundation, Inc.
|
||||
This file is part of GNU Classpath.
|
||||
|
||||
GNU Classpath 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.
|
||||
|
||||
GNU Classpath 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 GNU Classpath; see the file COPYING. If not, write to the
|
||||
Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
02110-1301 USA.
|
||||
|
||||
Linking this library statically or dynamically with other modules is
|
||||
making a combined work based on this library. Thus, the terms and
|
||||
conditions of the GNU General Public License cover the whole
|
||||
combination.
|
||||
|
||||
As a special exception, the copyright holders of this library give you
|
||||
permission to link this library with independent modules to produce an
|
||||
executable, regardless of the license terms of these independent
|
||||
modules, and to copy and distribute the resulting executable under
|
||||
terms of your choice, provided that you also meet, for each linked
|
||||
independent module, the terms and conditions of the license of that
|
||||
module. An independent module is a module which is not derived from
|
||||
or based on this library. If you modify this library, you may extend
|
||||
this exception to your version of the library, but you are not
|
||||
obligated to do so. If you do not wish to do so, delete this
|
||||
exception statement from your version. */
|
||||
|
||||
package gnu.test;
|
||||
|
||||
/**
|
||||
* Test passed but was expected to fail.
|
||||
*/
|
||||
public class XPass extends Result
|
||||
{
|
||||
/**
|
||||
* Constructs an XPass result code with additional information.
|
||||
*/
|
||||
public XPass(String msg) {
|
||||
super("XPASS", msg);
|
||||
}
|
||||
/**
|
||||
* Constructs an XPass result code.
|
||||
*/
|
||||
public XPass() {
|
||||
this("");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user