зеркало из https://github.com/mozilla/pjs.git
*** empty log message ***
This commit is contained in:
Родитель
4004be4f34
Коммит
53c09cac8a
|
@ -0,0 +1,43 @@
|
|||
/**
|
||||
* @author Raju Pallath
|
||||
* @version 1.0
|
||||
*
|
||||
* This class is the Base Class for all test cases.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
public class BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
* This is a dummy implementation of interface method
|
||||
*
|
||||
* @param obj Object instance (Node/Document/....)
|
||||
*
|
||||
* @return if test has passed then return true else false
|
||||
*
|
||||
*
|
||||
*/
|
||||
public boolean execute(Object obj)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a null Object. Classes extending this class will override this
|
||||
* method
|
||||
*
|
||||
*
|
||||
* @return Null object reference
|
||||
*
|
||||
*/
|
||||
public Object returnObject()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public static boolean FAILED=false;
|
||||
public static boolean PASSED=true;
|
||||
}
|
|
@ -0,0 +1,736 @@
|
|||
/**
|
||||
* @version 1.00 06 Jul 1999
|
||||
* @author Raju Pallath
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.lang.*;
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import java.lang.reflect.*;
|
||||
import org.mozilla.dom.*;
|
||||
|
||||
|
||||
class BWJavaTemplate
|
||||
{
|
||||
ReflectionTest rt=null;
|
||||
String fullclass=null;
|
||||
String jclass=null;
|
||||
String packageName=null;
|
||||
String outputDir=null;
|
||||
Vector outputFiles=null;
|
||||
private String currMethod=new String();
|
||||
private String currParamList=new String();
|
||||
|
||||
public BWJavaTemplate(String ajclass, String aoutDir)
|
||||
{
|
||||
fullclass = ajclass;
|
||||
if (fullclass == null) {
|
||||
System.out.println("Class Name cannot be NULL... ");
|
||||
return;
|
||||
}
|
||||
|
||||
int idx = fullclass.lastIndexOf(".");
|
||||
if ( idx != -1)
|
||||
{
|
||||
packageName = fullclass.substring(0, idx);
|
||||
jclass = fullclass.substring(idx+1);
|
||||
System.out.println("packageName is " + packageName);
|
||||
} else {
|
||||
jclass = fullclass;
|
||||
}
|
||||
System.out.println("class Name is " + jclass);
|
||||
|
||||
rt = new ReflectionTest();
|
||||
if (rt == null) {
|
||||
System.out.println("Could not instantiate ReflectionTest...\n");
|
||||
return;
|
||||
}
|
||||
outputFiles = new Vector();
|
||||
|
||||
if (!(parseClassConstructor())) return;
|
||||
if (!(parseClassMethod())) return;
|
||||
|
||||
DataOutputStream dos = null;
|
||||
String txtFile = jclass + ".txt";
|
||||
try {
|
||||
dos = new DataOutputStream( new FileOutputStream(txtFile));
|
||||
} catch (Exception e) {
|
||||
System.out.println("ERROR: Could not create File " + txtFile);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
//dos.write("#Class|Method|Parameter|FileName\n".getBytes());
|
||||
for(int i=0; i<outputFiles.size(); i++)
|
||||
{
|
||||
dos.write(((String)outputFiles.elementAt(i)).getBytes());
|
||||
dos.write("\n".getBytes());
|
||||
}
|
||||
} catch (IOException e) {
|
||||
System.out.println("ERROR: Could not write to File " + txtFile);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
dos.close();
|
||||
} catch (Exception e) {
|
||||
System.out.println("ERROR: Could not close File " + txtFile);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the class constructors and create class files
|
||||
*
|
||||
* @return Either true or false
|
||||
*/
|
||||
public boolean parseClassConstructor()
|
||||
{
|
||||
Class cl = null;
|
||||
try {
|
||||
cl = Class.forName(fullclass);
|
||||
} catch (Exception e) {
|
||||
System.out.println("Could not find class file " + fullclass);
|
||||
return false;
|
||||
}
|
||||
if (Modifier.isAbstract(cl.getModifiers()))
|
||||
return false;
|
||||
|
||||
if (Modifier.isInterface(cl.getModifiers()))
|
||||
return false;
|
||||
|
||||
Constructor constructors[] = rt.getConstructors(cl);
|
||||
String paramString = null;
|
||||
int staticFlag=0;
|
||||
for (int i = 0; i < constructors.length; i++)
|
||||
{
|
||||
staticFlag=0;
|
||||
String returnType = "void";
|
||||
Constructor c = constructors[i];
|
||||
Class[] paramTypes = c.getParameterTypes();
|
||||
String conName = c.getName();
|
||||
currMethod = conName;
|
||||
|
||||
int mod = c.getModifiers();
|
||||
if (Modifier.isStatic(mod))
|
||||
staticFlag = 1;
|
||||
else if (!(Modifier.isPublic(mod)))
|
||||
continue;
|
||||
|
||||
paramString = new String();
|
||||
ParamCombination pcomb = null;
|
||||
pcomb = new ParamCombination(paramTypes.length);
|
||||
if (pcomb == null)
|
||||
{
|
||||
System.out.println("Could not instantiate ParamCombination...\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
for (int j = 0; j < paramTypes.length; j++)
|
||||
{
|
||||
// Construct parameter string (param1_param2_...)
|
||||
String pstr = paramTypes[j].getName();
|
||||
String tstr = new String("");
|
||||
|
||||
|
||||
// check if param is an Array and accordingly get
|
||||
// component type.
|
||||
if (pstr.startsWith("["))
|
||||
{
|
||||
int index = pstr.lastIndexOf("[") + 1;
|
||||
tstr = "Arr" + (new Integer(index)).toString();
|
||||
pstr = (pstr.substring(index)).trim();
|
||||
if (pstr.length() == 1) {
|
||||
if (pstr.compareTo("I") == 0)
|
||||
tstr = tstr + "int";
|
||||
else if (pstr.compareTo("F") == 0)
|
||||
tstr = tstr + "float";
|
||||
else if (pstr.compareTo("D") == 0)
|
||||
tstr = tstr + "double";
|
||||
else if (pstr.compareTo("S") == 0)
|
||||
tstr = tstr + "short";
|
||||
else if (pstr.compareTo("C") == 0)
|
||||
tstr = tstr + "char";
|
||||
else if (pstr.compareTo("B") == 0)
|
||||
tstr = tstr + "byte";
|
||||
|
||||
} else {
|
||||
// Remove the leading 'L' from the string
|
||||
pstr = pstr.substring(1);
|
||||
}
|
||||
|
||||
// Remove trailing semicolon
|
||||
int slen = pstr.length();
|
||||
pstr = pstr.substring(0, slen-1);
|
||||
}
|
||||
|
||||
// Remove . from paramname (java.lang.String)
|
||||
int idx = pstr.lastIndexOf(".");
|
||||
if (idx != -1)
|
||||
{
|
||||
pstr = pstr.substring(idx + 1);
|
||||
}
|
||||
tstr = tstr + pstr;
|
||||
paramString = paramString + "_" + tstr;
|
||||
|
||||
/* get value list for parameter */
|
||||
pcomb.addElement(getParameterValueList(tstr));
|
||||
|
||||
}
|
||||
|
||||
// remove leading underscore
|
||||
if (paramString.length() > 1)
|
||||
paramString = paramString.substring(1);
|
||||
|
||||
currParamList = paramString;
|
||||
|
||||
String combstr[] = pcomb.getValueList();
|
||||
if (combstr != null)
|
||||
{
|
||||
for (int k=0; k< combstr.length; k++)
|
||||
{
|
||||
String pstr = paramString + "_" + (new Integer(k)).toString();
|
||||
createTemplate(jclass, jclass, pstr, combstr[k], returnType, staticFlag);
|
||||
}
|
||||
} else {
|
||||
createTemplate(jclass, jclass, null, null, returnType, staticFlag);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses the class methods and create class files
|
||||
*
|
||||
* @return Either true or false
|
||||
*/
|
||||
public boolean parseClassMethod()
|
||||
{
|
||||
Class cl = null;
|
||||
try {
|
||||
cl = Class.forName(fullclass);
|
||||
} catch (Exception e) {
|
||||
System.out.println("Could not find class file " + fullclass);
|
||||
return false;
|
||||
}
|
||||
Method methods[] = rt.getMethods(cl);
|
||||
String paramString = null;
|
||||
int staticFlag=0;
|
||||
for (int i = 0; i < methods.length; i++)
|
||||
{
|
||||
staticFlag=0;
|
||||
Method m = methods[i];
|
||||
Class[] paramTypes = m.getParameterTypes();
|
||||
String conName = m.getName();
|
||||
String returnType = (m.getReturnType()).getName();
|
||||
currMethod = conName;
|
||||
|
||||
int mod = m.getModifiers();
|
||||
if (Modifier.isStatic(mod))
|
||||
staticFlag = 1;
|
||||
else if (!(Modifier.isPublic(mod)))
|
||||
continue;
|
||||
|
||||
paramString = new String();
|
||||
ParamCombination pcomb = null;
|
||||
pcomb = new ParamCombination(paramTypes.length);
|
||||
if (pcomb == null)
|
||||
{
|
||||
System.out.println("Could not instantiate ParamCombination...\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (Modifier.isStatic(m.getModifiers()))
|
||||
staticFlag = 1;
|
||||
|
||||
for (int j = 0; j < paramTypes.length; j++)
|
||||
{
|
||||
// Construct parameter string (param1_param2_...)
|
||||
String pstr = paramTypes[j].getName();
|
||||
String tstr = new String("");
|
||||
|
||||
|
||||
// check if param is an Array and accordingly get
|
||||
// component type.
|
||||
if (pstr.startsWith("["))
|
||||
{
|
||||
int index = pstr.lastIndexOf("[") + 1;
|
||||
tstr = "Arr" + (new Integer(index)).toString();
|
||||
pstr = (pstr.substring(index)).trim();
|
||||
if (pstr.length() == 1) {
|
||||
if (pstr.compareTo("I") == 0)
|
||||
tstr = tstr + "int";
|
||||
else if (pstr.compareTo("F") == 0)
|
||||
tstr = tstr + "float";
|
||||
else if (pstr.compareTo("D") == 0)
|
||||
tstr = tstr + "double";
|
||||
else if (pstr.compareTo("S") == 0)
|
||||
tstr = tstr + "short";
|
||||
else if (pstr.compareTo("C") == 0)
|
||||
tstr = tstr + "char";
|
||||
else if (pstr.compareTo("B") == 0)
|
||||
tstr = tstr + "byte";
|
||||
|
||||
} else {
|
||||
// Remove the leading 'L' from the string
|
||||
pstr = pstr.substring(1);
|
||||
}
|
||||
|
||||
// Remove trailing semicolon
|
||||
int slen = pstr.length();
|
||||
pstr = pstr.substring(0, slen-1);
|
||||
}
|
||||
|
||||
// Remove . from paramname (java.lang.String)
|
||||
int idx = pstr.lastIndexOf(".");
|
||||
if (idx != -1)
|
||||
{
|
||||
pstr = pstr.substring(idx + 1);
|
||||
}
|
||||
tstr = tstr + pstr;
|
||||
paramString = paramString + "_" + tstr;
|
||||
|
||||
/* get value list for parameter */
|
||||
pcomb.addElement(getParameterValueList(tstr));
|
||||
|
||||
}
|
||||
|
||||
// remove leading underscore
|
||||
if (paramString.length() > 1)
|
||||
paramString = paramString.substring(1);
|
||||
|
||||
String combstr[] = pcomb.getValueList();
|
||||
if (combstr != null)
|
||||
{
|
||||
for (int k=0; k< combstr.length; k++)
|
||||
{
|
||||
String pstr = paramString + "_" + (new Integer(k)).toString();
|
||||
currParamList = paramString;
|
||||
createTemplate(jclass, conName, pstr, combstr[k], returnType, staticFlag);
|
||||
}
|
||||
} else {
|
||||
createTemplate(jclass, conName, null, null, returnType, staticFlag);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* GetParses the class constructors and create class files
|
||||
*
|
||||
* @param Name of the paramter class
|
||||
* @return Vector of all permissbile values for this class
|
||||
* viz: for String class it will be null/"dummy"
|
||||
*/
|
||||
public Vector getParameterValueList(String param)
|
||||
{
|
||||
Vector result = null;
|
||||
|
||||
if (param == null) return null;
|
||||
result = new Vector();
|
||||
|
||||
if (param.compareTo("String") == 0)
|
||||
{
|
||||
result.addElement("\"null\"");
|
||||
result.addElement("\"DUMMY_STRING\"");
|
||||
} else
|
||||
if (param.compareTo("int") == 0)
|
||||
{
|
||||
result.addElement("0");
|
||||
result.addElement("Integer.MIN_VALUE");
|
||||
result.addElement("Integer.MAX_VALUE");
|
||||
} else
|
||||
if (param.compareTo("float") == 0)
|
||||
{
|
||||
result.addElement("0");
|
||||
result.addElement("Float.MAX_VALUE");
|
||||
result.addElement("Float.NaN");
|
||||
} else
|
||||
if (param.compareTo("double") == 0)
|
||||
{
|
||||
result.addElement("0");
|
||||
result.addElement("Double.MAX_VALUE");
|
||||
result.addElement("Double.NaN");
|
||||
} else
|
||||
if (param.compareTo("long") == 0)
|
||||
{
|
||||
result.addElement("0");
|
||||
result.addElement("Long.MIN_VALUE");
|
||||
result.addElement("Long.MAX_VALUE");
|
||||
} else
|
||||
if (param.compareTo("short") == 0)
|
||||
{
|
||||
result.addElement("0");
|
||||
result.addElement("Short.MIN_VALUE");
|
||||
result.addElement("Short.MAX_VALUE");
|
||||
} else
|
||||
if (param.compareTo("char") == 0)
|
||||
{
|
||||
result.addElement("Character.MAX_VALUE");
|
||||
} else
|
||||
if (param.compareTo("boolean") == 0)
|
||||
{
|
||||
result.addElement("true");
|
||||
result.addElement("false");
|
||||
} else
|
||||
if (param.compareTo("byte") == 0)
|
||||
{
|
||||
result.addElement("Byte.MIN_VALUE");
|
||||
result.addElement("Byte.MAX_VALUE");
|
||||
} else
|
||||
if (param.compareTo("Integer") == 0)
|
||||
{
|
||||
result.addElement("null");
|
||||
result.addElement("new Integer(0)");
|
||||
result.addElement("new Integer(Integer.MIN_VALUE)");
|
||||
result.addElement("new Integer(Integer.MAX_VALUE)");
|
||||
} else
|
||||
if (param.compareTo("Float") == 0)
|
||||
{
|
||||
result.addElement("null");
|
||||
result.addElement("new Float(0)");
|
||||
result.addElement("new Float(Float.MAX_VALUE)");
|
||||
result.addElement("new Float(Float.NaN)");
|
||||
} else
|
||||
if (param.compareTo("Double") == 0)
|
||||
{
|
||||
result.addElement("null");
|
||||
result.addElement("new Double(0)");
|
||||
result.addElement("new Double(Double.MAX_VALUE)");
|
||||
result.addElement("new Double(Double.NaN)");
|
||||
} else
|
||||
if (param.compareTo("Long") == 0)
|
||||
{
|
||||
result.addElement("null");
|
||||
result.addElement("new Long(0)");
|
||||
result.addElement("new Long(Long.MIN_VALUE)");
|
||||
result.addElement("new Long(Long.MAX_VALUE)");
|
||||
} else
|
||||
if (param.compareTo("Short") == 0)
|
||||
{
|
||||
result.addElement("null");
|
||||
result.addElement("new Short(0)");
|
||||
result.addElement("new Short(Short.MIN_VALUE)");
|
||||
result.addElement("new Short(Short.MAX_VALUE)");
|
||||
} else
|
||||
if (param.compareTo("Character") == 0)
|
||||
{
|
||||
result.addElement("'" + (new Character(Character.MAX_VALUE)).toString() + "`");
|
||||
} else
|
||||
if (param.compareTo("Byte") == 0)
|
||||
{
|
||||
result.addElement("null");
|
||||
result.addElement("new Byte(Byte.MIN_VALUE)");
|
||||
result.addElement("new Byte(Byte.MAX_VALUE)");
|
||||
} else {
|
||||
result.addElement("null");
|
||||
result.addElement("NOTNULL");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create Template Java File
|
||||
*
|
||||
* @param className Name of the class file
|
||||
* @param methodName Name of the method
|
||||
* @param paramString Concated string of parameter types separated by
|
||||
* underscores.
|
||||
* @param valueList A concated String of values for the above
|
||||
* parameters in the given order
|
||||
* @param returnType Return Type for the given method.
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public void createTemplate( String className,
|
||||
String methodName,
|
||||
String paramString,
|
||||
String valueList,
|
||||
String returnType,
|
||||
int staticFlag
|
||||
)
|
||||
{
|
||||
if (className == null) return;
|
||||
if (methodName == null) return;
|
||||
if (returnType == null) return;
|
||||
if (paramString != null)
|
||||
if (valueList == null) return;
|
||||
|
||||
|
||||
String cName = new String();
|
||||
String filename = new String();
|
||||
if (paramString != null){
|
||||
cName = className + "_" + methodName + "_" + paramString;
|
||||
filename = cName + ".java";
|
||||
} else {
|
||||
cName = className + "_" + methodName;
|
||||
filename = cName + ".java";
|
||||
}
|
||||
|
||||
|
||||
DataOutputStream raf = null;
|
||||
try {
|
||||
raf = new DataOutputStream( new FileOutputStream(filename));
|
||||
} catch (Exception e) {
|
||||
System.out.println("ERROR: Could not create File " + filename);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
String fstr = new String();
|
||||
fstr = fstr + "/**";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " *";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " * @version 1.00 ";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " * @author ";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " *";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " * TESTID ";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " * ";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " *";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " */";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + "package org.mozilla.dom.test;";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + "import java.util.*;";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + "import java.io.*;";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + "import org.mozilla.dom.test.*;";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + "import org.mozilla.dom.*;";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + "import org.w3c.dom.*;";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + "public class " + cName;
|
||||
fstr = fstr + " extends BWBaseTest implements Execution";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + "{";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " /**";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " *";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " ***********************************************************";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " * Constructor";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " ***********************************************************";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " *";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " */";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " public " + cName + "()";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " {";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " }";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " /**";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " *";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " ***********************************************************";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " * Starting point of application";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " *";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " * @param args Array of command line arguments";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " *";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " ***********************************************************";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " */";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " public static void main(String[] args)";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " {";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " }";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " /**";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " ***********************************************************";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " *";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " * Execute Method ";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " *";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " * @param tobj Object reference (Node/Document/...)";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " * @return true or false depending on whether test passed or failed.";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " *";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " ***********************************************************";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " */";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " public boolean execute(Object tobj)";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " {";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " if (tobj == null) {";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " TestLoader.logPrint(\"Object is NULL...\");";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " return BWBaseTest.FAILED;";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " }";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " String os = System.getProperty(\"OS\");";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " osRoutine(os);";
|
||||
fstr = fstr + "\n";
|
||||
|
||||
String pString=valueList;
|
||||
if (valueList == null)
|
||||
pString= new String("");
|
||||
|
||||
|
||||
fstr = fstr + " return BWBaseTest.PASSED;";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " }";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " /**";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " *";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " ***********************************************************";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " * Routine where OS specific checks are made. ";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " *";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " * @param os OS Name (SunOS/Linus/MacOS/...)";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " ***********************************************************";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " *";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " */";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " private void osRoutine(String os)";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " {";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " if(os == null) return;";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " os = os.trim();";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " if(os.compareTo(\"SunOS\") == 0) {}";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " else if(os.compareTo(\"Linux\") == 0) {}";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " else if(os.compareTo(\"Windows\") == 0) {}";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " else if(os.compareTo(\"MacOS\") == 0) {}";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " else {}";
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + " }";
|
||||
|
||||
fstr = fstr + "\n";
|
||||
fstr = fstr + "}";
|
||||
fstr = fstr + "\n";
|
||||
|
||||
raf.write(fstr.getBytes());
|
||||
} catch (IOException e) {
|
||||
System.out.println("ERROR: Could not write to File " + filename);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
raf.close();
|
||||
} catch (Exception e) {
|
||||
System.out.println("ERROR: Could not close File " + filename);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
DataOutputStream dos = null;
|
||||
String txtFile = className + ".txt";
|
||||
try {
|
||||
dos = new DataOutputStream( new FileOutputStream(txtFile));
|
||||
} catch (Exception e) {
|
||||
System.out.println("ERROR: Could not create File " + txtFile);
|
||||
return;
|
||||
}
|
||||
|
||||
String str = className + ":" + currMethod + ":" + currParamList + ":" + filename;
|
||||
outputFiles.addElement(str);
|
||||
try {
|
||||
dos.write(str.getBytes());
|
||||
} catch (IOException e) {
|
||||
System.out.println("ERROR: Could not write to File " + txtFile);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
dos.close();
|
||||
} catch (Exception e) {
|
||||
System.out.println("ERROR: Could not close File " + txtFile);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public static void usage()
|
||||
{
|
||||
System.out.println("Usage: java JavaTestTemplate [-d <output dir>] <className>");
|
||||
}
|
||||
|
||||
public static void main(String args[])
|
||||
{
|
||||
if (args.length == 0)
|
||||
{
|
||||
BWJavaTemplate.usage();
|
||||
return;
|
||||
}
|
||||
|
||||
String className = null;
|
||||
String outDirectory = null;
|
||||
|
||||
if (args.length == 3) {
|
||||
if (args[0].compareTo("-d") != 0) {
|
||||
BWJavaTemplate.usage();
|
||||
return;
|
||||
} else {
|
||||
outDirectory = args[1];
|
||||
className = args[2];
|
||||
}
|
||||
} else {
|
||||
outDirectory = new String(".");
|
||||
className = args[0];
|
||||
}
|
||||
|
||||
BWJavaTemplate jt = new BWJavaTemplate(className, outDirectory);
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
BW_TESTDIR=`pwd`
|
||||
BW_TESTFILE=BWTestClass.lst
|
||||
BW_LOGDIR=`pwd`/log
|
||||
BW_LOGFILE=BWTest.log
|
|
@ -0,0 +1 @@
|
|||
org.mozilla.dom.test.AttrImpl_getName
|
|
@ -0,0 +1,156 @@
|
|||
org.mozilla.dom.test.AttrImpl_getName
|
||||
org.mozilla.dom.test.AttrImpl_getSpecified
|
||||
org.mozilla.dom.test.AttrImpl_getValue
|
||||
org.mozilla.dom.test.AttrImpl_setValue_String_0
|
||||
org.mozilla.dom.test.AttrImpl_setValue_String_1
|
||||
org.mozilla.dom.test.CharacterDataImpl_appendData_String_0
|
||||
org.mozilla.dom.test.CharacterDataImpl_appendData_String_1
|
||||
org.mozilla.dom.test.CharacterDataImpl_deleteData_int_int_0
|
||||
org.mozilla.dom.test.CharacterDataImpl_deleteData_int_int_1
|
||||
org.mozilla.dom.test.CharacterDataImpl_deleteData_int_int_2
|
||||
org.mozilla.dom.test.CharacterDataImpl_deleteData_int_int_3
|
||||
org.mozilla.dom.test.CharacterDataImpl_deleteData_int_int_4
|
||||
org.mozilla.dom.test.CharacterDataImpl_deleteData_int_int_5
|
||||
org.mozilla.dom.test.CharacterDataImpl_deleteData_int_int_6
|
||||
org.mozilla.dom.test.CharacterDataImpl_deleteData_int_int_7
|
||||
org.mozilla.dom.test.CharacterDataImpl_deleteData_int_int_8
|
||||
org.mozilla.dom.test.CharacterDataImpl_getData
|
||||
org.mozilla.dom.test.CharacterDataImpl_getLength
|
||||
org.mozilla.dom.test.CharacterDataImpl_insertData_int_String_0
|
||||
org.mozilla.dom.test.CharacterDataImpl_insertData_int_String_1
|
||||
org.mozilla.dom.test.CharacterDataImpl_insertData_int_String_2
|
||||
org.mozilla.dom.test.CharacterDataImpl_insertData_int_String_3
|
||||
org.mozilla.dom.test.CharacterDataImpl_insertData_int_String_4
|
||||
org.mozilla.dom.test.CharacterDataImpl_insertData_int_String_5
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_0
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_1
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_10
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_11
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_12
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_13
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_14
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_15
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_16
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_17
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_2
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_3
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_4
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_5
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_6
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_7
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_8
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_9
|
||||
org.mozilla.dom.test.CharacterDataImpl_setData_String_0
|
||||
org.mozilla.dom.test.CharacterDataImpl_setData_String_1
|
||||
org.mozilla.dom.test.CharacterDataImpl_substringData_int_int_0
|
||||
org.mozilla.dom.test.CharacterDataImpl_substringData_int_int_1
|
||||
org.mozilla.dom.test.CharacterDataImpl_substringData_int_int_2
|
||||
org.mozilla.dom.test.CharacterDataImpl_substringData_int_int_3
|
||||
org.mozilla.dom.test.CharacterDataImpl_substringData_int_int_4
|
||||
org.mozilla.dom.test.CharacterDataImpl_substringData_int_int_5
|
||||
org.mozilla.dom.test.CharacterDataImpl_substringData_int_int_6
|
||||
org.mozilla.dom.test.CharacterDataImpl_substringData_int_int_7
|
||||
org.mozilla.dom.test.CharacterDataImpl_substringData_int_int_8
|
||||
org.mozilla.dom.test.DOMImplementationImpl_hasFeature_String_String_0
|
||||
org.mozilla.dom.test.DOMImplementationImpl_hasFeature_String_String_1
|
||||
org.mozilla.dom.test.DOMImplementationImpl_hasFeature_String_String_2
|
||||
org.mozilla.dom.test.DOMImplementationImpl_hasFeature_String_String_3
|
||||
org.mozilla.dom.test.DOMImplementationImpl_hasFeature_String_String_4
|
||||
org.mozilla.dom.test.DocumentImpl_createAttribute_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_createAttribute_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_createCDATASection_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_createCDATASection_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_createComment_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_createComment_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_createDocumentFragment
|
||||
org.mozilla.dom.test.DocumentImpl_createElement_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_createElement_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_createEntityReference_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_createEntityReference_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_createProcessingInstruction_String_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_createProcessingInstruction_String_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_createProcessingInstruction_String_String_2
|
||||
org.mozilla.dom.test.DocumentImpl_createProcessingInstruction_String_String_3
|
||||
org.mozilla.dom.test.DocumentImpl_createTextNode_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_createTextNode_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_getDoctype
|
||||
org.mozilla.dom.test.DocumentImpl_getDocumentElement
|
||||
org.mozilla.dom.test.DocumentImpl_getElementsByTagName_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_getElementsByTagName_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_getImplementation
|
||||
org.mozilla.dom.test.DocumentTypeImpl_getEntities
|
||||
org.mozilla.dom.test.DocumentTypeImpl_getName
|
||||
org.mozilla.dom.test.DocumentTypeImpl_getNotations
|
||||
org.mozilla.dom.test.ElementImpl_getAttributeNode_String_0
|
||||
org.mozilla.dom.test.ElementImpl_getAttributeNode_String_1
|
||||
org.mozilla.dom.test.ElementImpl_getAttribute_String_0
|
||||
org.mozilla.dom.test.ElementImpl_getAttribute_String_1
|
||||
org.mozilla.dom.test.ElementImpl_getElementsByTagName_String_0
|
||||
org.mozilla.dom.test.ElementImpl_getElementsByTagName_String_1
|
||||
org.mozilla.dom.test.ElementImpl_getTagName
|
||||
org.mozilla.dom.test.ElementImpl_normalize
|
||||
org.mozilla.dom.test.ElementImpl_removeAttributeNode_Attr_0
|
||||
org.mozilla.dom.test.ElementImpl_removeAttributeNode_Attr_1
|
||||
org.mozilla.dom.test.ElementImpl_removeAttribute_String_0
|
||||
org.mozilla.dom.test.ElementImpl_removeAttribute_String_1
|
||||
org.mozilla.dom.test.ElementImpl_setAttributeNode_Attr_0
|
||||
org.mozilla.dom.test.ElementImpl_setAttributeNode_Attr_1
|
||||
org.mozilla.dom.test.ElementImpl_setAttribute_String_String_0
|
||||
org.mozilla.dom.test.ElementImpl_setAttribute_String_String_1
|
||||
org.mozilla.dom.test.ElementImpl_setAttribute_String_String_2
|
||||
org.mozilla.dom.test.ElementImpl_setAttribute_String_String_3
|
||||
org.mozilla.dom.test.NamedNodeMapImpl_getLength
|
||||
org.mozilla.dom.test.NamedNodeMapImpl_getNamedItem_String_0
|
||||
org.mozilla.dom.test.NamedNodeMapImpl_getNamedItem_String_1
|
||||
org.mozilla.dom.test.NamedNodeMapImpl_item_int_0
|
||||
org.mozilla.dom.test.NamedNodeMapImpl_item_int_1
|
||||
org.mozilla.dom.test.NamedNodeMapImpl_item_int_2
|
||||
org.mozilla.dom.test.NamedNodeMapImpl_removeNamedItem_String_0
|
||||
org.mozilla.dom.test.NamedNodeMapImpl_removeNamedItem_String_1
|
||||
org.mozilla.dom.test.NamedNodeMapImpl_setNamedItem_Node_0
|
||||
org.mozilla.dom.test.NamedNodeMapImpl_setNamedItem_Node_1
|
||||
org.mozilla.dom.test.NodeImpl_appendChild_Node_0
|
||||
org.mozilla.dom.test.NodeImpl_appendChild_Node_1
|
||||
org.mozilla.dom.test.NodeImpl_cloneNode_boolean_0
|
||||
org.mozilla.dom.test.NodeImpl_cloneNode_boolean_1
|
||||
org.mozilla.dom.test.NodeImpl_equals_Object_0
|
||||
org.mozilla.dom.test.NodeImpl_equals_Object_1
|
||||
org.mozilla.dom.test.NodeImpl_equals_Object_2
|
||||
org.mozilla.dom.test.NodeImpl_equals_Object_3
|
||||
org.mozilla.dom.test.NodeImpl_getAttributes
|
||||
org.mozilla.dom.test.NodeImpl_getChildNodes
|
||||
org.mozilla.dom.test.NodeImpl_getFirstChild
|
||||
org.mozilla.dom.test.NodeImpl_getLastChild
|
||||
org.mozilla.dom.test.NodeImpl_getNextSibling
|
||||
org.mozilla.dom.test.NodeImpl_getNodeName
|
||||
org.mozilla.dom.test.NodeImpl_getNodeType
|
||||
org.mozilla.dom.test.NodeImpl_getNodeValue
|
||||
org.mozilla.dom.test.NodeImpl_getOwnerDocument
|
||||
org.mozilla.dom.test.NodeImpl_getParentNode
|
||||
org.mozilla.dom.test.NodeImpl_getPreviousSibling
|
||||
org.mozilla.dom.test.NodeImpl_hasChildNodes
|
||||
org.mozilla.dom.test.NodeImpl_hashCode
|
||||
org.mozilla.dom.test.NodeImpl_insertBefore_Node_Node_0
|
||||
org.mozilla.dom.test.NodeImpl_insertBefore_Node_Node_1
|
||||
org.mozilla.dom.test.NodeImpl_insertBefore_Node_Node_2
|
||||
org.mozilla.dom.test.NodeImpl_insertBefore_Node_Node_3
|
||||
org.mozilla.dom.test.NodeImpl_removeChild_Node_0
|
||||
org.mozilla.dom.test.NodeImpl_removeChild_Node_1
|
||||
org.mozilla.dom.test.NodeImpl_replaceChild_Node_Node_0
|
||||
org.mozilla.dom.test.NodeImpl_replaceChild_Node_Node_1
|
||||
org.mozilla.dom.test.NodeImpl_replaceChild_Node_Node_2
|
||||
org.mozilla.dom.test.NodeImpl_replaceChild_Node_Node_3
|
||||
org.mozilla.dom.test.NodeImpl_setNodeValue_String_0
|
||||
org.mozilla.dom.test.NodeImpl_setNodeValue_String_1
|
||||
org.mozilla.dom.test.NodeImpl_toString
|
||||
org.mozilla.dom.test.NodeListImpl_getLength
|
||||
org.mozilla.dom.test.NodeListImpl_item_int_0
|
||||
org.mozilla.dom.test.NodeListImpl_item_int_1
|
||||
org.mozilla.dom.test.NodeListImpl_item_int_2
|
||||
org.mozilla.dom.test.ProcessingInstructionImpl_getData
|
||||
org.mozilla.dom.test.ProcessingInstructionImpl_getTarget
|
||||
org.mozilla.dom.test.ProcessingInstructionImpl_setData_String_0
|
||||
org.mozilla.dom.test.ProcessingInstructionImpl_setData_String_1
|
||||
org.mozilla.dom.test.TextImpl_splitText_int_0
|
||||
org.mozilla.dom.test.TextImpl_splitText_int_1
|
||||
org.mozilla.dom.test.TextImpl_splitText_int_2
|
|
@ -0,0 +1 @@
|
|||
org.mozilla.dom.test.DocumentImpl_createComment_String_1
|
|
@ -0,0 +1,141 @@
|
|||
org.mozilla.dom.test.AttrImpl_getName
|
||||
org.mozilla.dom.test.AttrImpl_getSpecified
|
||||
org.mozilla.dom.test.AttrImpl_getValue
|
||||
org.mozilla.dom.test.AttrImpl_setValue_String_0
|
||||
org.mozilla.dom.test.AttrImpl_setValue_String_1
|
||||
org.mozilla.dom.test.CharacterDataImpl_appendData_String_0
|
||||
org.mozilla.dom.test.CharacterDataImpl_appendData_String_1
|
||||
org.mozilla.dom.test.CharacterDataImpl_deleteData_int_int_0
|
||||
org.mozilla.dom.test.CharacterDataImpl_deleteData_int_int_1
|
||||
org.mozilla.dom.test.CharacterDataImpl_deleteData_int_int_2
|
||||
org.mozilla.dom.test.CharacterDataImpl_deleteData_int_int_3
|
||||
org.mozilla.dom.test.CharacterDataImpl_deleteData_int_int_4
|
||||
org.mozilla.dom.test.CharacterDataImpl_deleteData_int_int_5
|
||||
org.mozilla.dom.test.CharacterDataImpl_deleteData_int_int_6
|
||||
org.mozilla.dom.test.CharacterDataImpl_deleteData_int_int_7
|
||||
org.mozilla.dom.test.CharacterDataImpl_deleteData_int_int_8
|
||||
org.mozilla.dom.test.CharacterDataImpl_getData
|
||||
org.mozilla.dom.test.CharacterDataImpl_getLength
|
||||
org.mozilla.dom.test.CharacterDataImpl_insertData_int_String_0
|
||||
org.mozilla.dom.test.CharacterDataImpl_insertData_int_String_1
|
||||
org.mozilla.dom.test.CharacterDataImpl_insertData_int_String_2
|
||||
org.mozilla.dom.test.CharacterDataImpl_insertData_int_String_3
|
||||
org.mozilla.dom.test.CharacterDataImpl_insertData_int_String_4
|
||||
org.mozilla.dom.test.CharacterDataImpl_insertData_int_String_5
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_0
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_1
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_10
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_11
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_12
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_13
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_14
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_15
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_16
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_17
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_2
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_3
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_4
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_5
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_6
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_7
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_8
|
||||
org.mozilla.dom.test.CharacterDataImpl_replaceData_int_int_String_9
|
||||
org.mozilla.dom.test.CharacterDataImpl_setData_String_0
|
||||
org.mozilla.dom.test.CharacterDataImpl_setData_String_1
|
||||
org.mozilla.dom.test.CharacterDataImpl_substringData_int_int_0
|
||||
org.mozilla.dom.test.CharacterDataImpl_substringData_int_int_1
|
||||
org.mozilla.dom.test.CharacterDataImpl_substringData_int_int_2
|
||||
org.mozilla.dom.test.CharacterDataImpl_substringData_int_int_3
|
||||
org.mozilla.dom.test.CharacterDataImpl_substringData_int_int_4
|
||||
org.mozilla.dom.test.CharacterDataImpl_substringData_int_int_5
|
||||
org.mozilla.dom.test.CharacterDataImpl_substringData_int_int_6
|
||||
org.mozilla.dom.test.CharacterDataImpl_substringData_int_int_7
|
||||
org.mozilla.dom.test.CharacterDataImpl_substringData_int_int_8
|
||||
org.mozilla.dom.test.DOMImplementationImpl_hasFeature_String_String_0
|
||||
org.mozilla.dom.test.DOMImplementationImpl_hasFeature_String_String_1
|
||||
org.mozilla.dom.test.DOMImplementationImpl_hasFeature_String_String_2
|
||||
org.mozilla.dom.test.DOMImplementationImpl_hasFeature_String_String_3
|
||||
org.mozilla.dom.test.DocumentImpl_createAttribute_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_createAttribute_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_createComment_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_createComment_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_createDocumentFragment
|
||||
org.mozilla.dom.test.DocumentImpl_createElement_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_createElement_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_createTextNode_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_createTextNode_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_getDoctype
|
||||
org.mozilla.dom.test.DocumentImpl_getDocumentElement
|
||||
org.mozilla.dom.test.DocumentImpl_getElementsByTagName_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_getElementsByTagName_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_getImplementation
|
||||
org.mozilla.dom.test.DocumentTypeImpl_getName
|
||||
org.mozilla.dom.test.ElementImpl_getAttributeNode_String_0
|
||||
org.mozilla.dom.test.ElementImpl_getAttributeNode_String_1
|
||||
org.mozilla.dom.test.ElementImpl_getAttribute_String_0
|
||||
org.mozilla.dom.test.ElementImpl_getAttribute_String_1
|
||||
org.mozilla.dom.test.ElementImpl_getElementsByTagName_String_0
|
||||
org.mozilla.dom.test.ElementImpl_getElementsByTagName_String_1
|
||||
org.mozilla.dom.test.ElementImpl_getTagName
|
||||
org.mozilla.dom.test.ElementImpl_normalize
|
||||
org.mozilla.dom.test.ElementImpl_removeAttributeNode_Attr_0
|
||||
org.mozilla.dom.test.ElementImpl_removeAttributeNode_Attr_1
|
||||
org.mozilla.dom.test.ElementImpl_removeAttribute_String_0
|
||||
org.mozilla.dom.test.ElementImpl_removeAttribute_String_1
|
||||
org.mozilla.dom.test.ElementImpl_setAttributeNode_Attr_0
|
||||
org.mozilla.dom.test.ElementImpl_setAttributeNode_Attr_1
|
||||
org.mozilla.dom.test.ElementImpl_setAttribute_String_String_0
|
||||
org.mozilla.dom.test.ElementImpl_setAttribute_String_String_1
|
||||
org.mozilla.dom.test.ElementImpl_setAttribute_String_String_2
|
||||
org.mozilla.dom.test.ElementImpl_setAttribute_String_String_3
|
||||
org.mozilla.dom.test.NamedNodeMapImpl_getLength
|
||||
org.mozilla.dom.test.NamedNodeMapImpl_getNamedItem_String_0
|
||||
org.mozilla.dom.test.NamedNodeMapImpl_getNamedItem_String_1
|
||||
org.mozilla.dom.test.NamedNodeMapImpl_item_int_0
|
||||
org.mozilla.dom.test.NamedNodeMapImpl_item_int_1
|
||||
org.mozilla.dom.test.NamedNodeMapImpl_item_int_2
|
||||
org.mozilla.dom.test.NamedNodeMapImpl_removeNamedItem_String_0
|
||||
org.mozilla.dom.test.NamedNodeMapImpl_removeNamedItem_String_1
|
||||
org.mozilla.dom.test.NamedNodeMapImpl_setNamedItem_Node_0
|
||||
org.mozilla.dom.test.NamedNodeMapImpl_setNamedItem_Node_1
|
||||
org.mozilla.dom.test.NodeImpl_appendChild_Node_0
|
||||
org.mozilla.dom.test.NodeImpl_appendChild_Node_1
|
||||
org.mozilla.dom.test.NodeImpl_cloneNode_boolean_0
|
||||
org.mozilla.dom.test.NodeImpl_cloneNode_boolean_1
|
||||
org.mozilla.dom.test.NodeImpl_equals_Object_0
|
||||
org.mozilla.dom.test.NodeImpl_equals_Object_1
|
||||
org.mozilla.dom.test.NodeImpl_equals_Object_2
|
||||
org.mozilla.dom.test.NodeImpl_equals_Object_3
|
||||
org.mozilla.dom.test.NodeImpl_getAttributes
|
||||
org.mozilla.dom.test.NodeImpl_getChildNodes
|
||||
org.mozilla.dom.test.NodeImpl_getFirstChild
|
||||
org.mozilla.dom.test.NodeImpl_getLastChild
|
||||
org.mozilla.dom.test.NodeImpl_getNextSibling
|
||||
org.mozilla.dom.test.NodeImpl_getNodeName
|
||||
org.mozilla.dom.test.NodeImpl_getNodeType
|
||||
org.mozilla.dom.test.NodeImpl_getNodeValue
|
||||
org.mozilla.dom.test.NodeImpl_getOwnerDocument
|
||||
org.mozilla.dom.test.NodeImpl_getParentNode
|
||||
org.mozilla.dom.test.NodeImpl_getPreviousSibling
|
||||
org.mozilla.dom.test.NodeImpl_hasChildNodes
|
||||
org.mozilla.dom.test.NodeImpl_hashCode
|
||||
org.mozilla.dom.test.NodeImpl_insertBefore_Node_Node_0
|
||||
org.mozilla.dom.test.NodeImpl_insertBefore_Node_Node_1
|
||||
org.mozilla.dom.test.NodeImpl_insertBefore_Node_Node_2
|
||||
org.mozilla.dom.test.NodeImpl_insertBefore_Node_Node_3
|
||||
org.mozilla.dom.test.NodeImpl_removeChild_Node_0
|
||||
org.mozilla.dom.test.NodeImpl_removeChild_Node_1
|
||||
org.mozilla.dom.test.NodeImpl_replaceChild_Node_Node_0
|
||||
org.mozilla.dom.test.NodeImpl_replaceChild_Node_Node_1
|
||||
org.mozilla.dom.test.NodeImpl_replaceChild_Node_Node_2
|
||||
org.mozilla.dom.test.NodeImpl_replaceChild_Node_Node_3
|
||||
org.mozilla.dom.test.NodeImpl_setNodeValue_String_0
|
||||
org.mozilla.dom.test.NodeImpl_setNodeValue_String_1
|
||||
org.mozilla.dom.test.NodeImpl_toString
|
||||
org.mozilla.dom.test.NodeListImpl_getLength
|
||||
org.mozilla.dom.test.NodeListImpl_item_int_0
|
||||
org.mozilla.dom.test.NodeListImpl_item_int_1
|
||||
org.mozilla.dom.test.NodeListImpl_item_int_2
|
||||
org.mozilla.dom.test.TextImpl_splitText_int_0
|
||||
org.mozilla.dom.test.TextImpl_splitText_int_1
|
||||
org.mozilla.dom.test.TextImpl_splitText_int_2
|
|
@ -0,0 +1,31 @@
|
|||
org.mozilla.dom.test.DOMImplementationImpl_hasFeature_String_String_0
|
||||
org.mozilla.dom.test.DOMImplementationImpl_hasFeature_String_String_1
|
||||
org.mozilla.dom.test.DOMImplementationImpl_hasFeature_String_String_2
|
||||
org.mozilla.dom.test.DOMImplementationImpl_hasFeature_String_String_4
|
||||
org.mozilla.dom.test.DocumentImpl_createCDATASection_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_createCDATASection_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_createComment_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_createComment_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_createEntityReference_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_createEntityReference_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_createProcessingInstruction_String_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_createProcessingInstruction_String_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_createProcessingInstruction_String_String_2
|
||||
org.mozilla.dom.test.DocumentImpl_createProcessingInstruction_String_String_3
|
||||
org.mozilla.dom.test.DocumentImpl_createTextNode_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_createTextNode_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_getDoctype
|
||||
org.mozilla.dom.test.DocumentImpl_getDocumentElement
|
||||
org.mozilla.dom.test.DocumentImpl_getElementsByTagName_String_0
|
||||
org.mozilla.dom.test.DocumentImpl_getElementsByTagName_String_1
|
||||
org.mozilla.dom.test.DocumentImpl_getImplementation
|
||||
org.mozilla.dom.test.DocumentTypeImpl_getEntities
|
||||
org.mozilla.dom.test.DocumentTypeImpl_getName
|
||||
org.mozilla.dom.test.DocumentTypeImpl_getNotations
|
||||
org.mozilla.dom.test.ProcessingInstructionImpl_getData
|
||||
org.mozilla.dom.test.ProcessingInstructionImpl_getTarget
|
||||
org.mozilla.dom.test.ProcessingInstructionImpl_setData_String_0
|
||||
org.mozilla.dom.test.ProcessingInstructionImpl_setData_String_1
|
||||
org.mozilla.dom.test.TextImpl_splitText_int_0
|
||||
org.mozilla.dom.test.TextImpl_splitText_int_1
|
||||
org.mozilla.dom.test.TextImpl_splitText_int_2
|
|
@ -0,0 +1,152 @@
|
|||
/*
|
||||
The contents of this file are subject to the Mozilla Public License
|
||||
Version 1.0 (the "License"); you may not use this file except in
|
||||
compliance with the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS"
|
||||
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
|
||||
the License for the specific language governing rights and limitations
|
||||
under the License.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are Copyright (C) 1999 Sun Microsystems,
|
||||
Inc. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package org.mozilla.dom;
|
||||
|
||||
import java.util.Vector;
|
||||
import java.util.Enumeration;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import org.mozilla.dom.test.TestLoader;
|
||||
|
||||
public class DOMAccessorImpl implements DOMAccessor, DocumentLoadListener {
|
||||
|
||||
private DOMAccessor instance = null;
|
||||
private Vector documentLoadListeners = new Vector();
|
||||
|
||||
public static native void register();
|
||||
public static native void unregister();
|
||||
|
||||
public synchronized DOMAccessor getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new DOMAccessorImpl();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
public synchronized void
|
||||
addDocumentLoadListener(DocumentLoadListener listener) {
|
||||
|
||||
if (documentLoadListeners.size() == 0) {
|
||||
register();
|
||||
}
|
||||
documentLoadListeners.addElement(listener);
|
||||
}
|
||||
|
||||
public synchronized void
|
||||
removeDocumentLoadListener(DocumentLoadListener listener) {
|
||||
|
||||
documentLoadListeners.removeElement(listener);
|
||||
if (documentLoadListeners.size() == 0) {
|
||||
unregister();
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void
|
||||
startURLLoad(String url, String contentType, Document doc) {
|
||||
|
||||
for (Enumeration e = documentLoadListeners.elements();
|
||||
e.hasMoreElements();) {
|
||||
DocumentLoadListener listener =
|
||||
(DocumentLoadListener) e.nextElement();
|
||||
listener.startURLLoad(url, contentType, doc);
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void
|
||||
endURLLoad(String url, int status, Document doc) {
|
||||
|
||||
for (Enumeration e = documentLoadListeners.elements();
|
||||
e.hasMoreElements();) {
|
||||
DocumentLoadListener listener =
|
||||
(DocumentLoadListener) e.nextElement();
|
||||
listener.endURLLoad(url, status, doc);
|
||||
}
|
||||
|
||||
if ((!(url.endsWith(".html"))) && (!(url.endsWith(".xml"))))
|
||||
return;
|
||||
|
||||
if (url.endsWith(".html"))
|
||||
{
|
||||
if (url.indexOf("test.html") == -1) {
|
||||
System.out.println("TestCases Tuned to run with test.html...");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (url.endsWith(".xml"))
|
||||
{
|
||||
if (url.indexOf("test.xml") == -1) {
|
||||
System.out.println("TestCases Tuned to run with test.xml...");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Object obj = (Object) doc;
|
||||
|
||||
TestLoader tl = new TestLoader(obj, 0);
|
||||
if (tl != null) {
|
||||
Object retobj = tl.loadTest();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public synchronized void
|
||||
progressURLLoad(String url, int progress, int progressMax,
|
||||
Document doc) {
|
||||
|
||||
for (Enumeration e = documentLoadListeners.elements();
|
||||
e.hasMoreElements();) {
|
||||
DocumentLoadListener listener =
|
||||
(DocumentLoadListener) e.nextElement();
|
||||
listener.progressURLLoad(url, progress, progressMax, doc);
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void
|
||||
statusURLLoad(String url, String message, Document doc) {
|
||||
|
||||
for (Enumeration e = documentLoadListeners.elements();
|
||||
e.hasMoreElements();) {
|
||||
DocumentLoadListener listener =
|
||||
(DocumentLoadListener) e.nextElement();
|
||||
listener.statusURLLoad(url, message, doc);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public synchronized void
|
||||
startDocumentLoad(String url) {
|
||||
|
||||
for (Enumeration e = documentLoadListeners.elements();
|
||||
e.hasMoreElements();) {
|
||||
DocumentLoadListener listener =
|
||||
(DocumentLoadListener) e.nextElement();
|
||||
listener.startDocumentLoad(url);
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void
|
||||
endDocumentLoad(String url, int status, Document doc) {
|
||||
|
||||
for (Enumeration e = documentLoadListeners.elements();
|
||||
e.hasMoreElements();) {
|
||||
DocumentLoadListener listener =
|
||||
(DocumentLoadListener) e.nextElement();
|
||||
listener.endDocumentLoad(url, status, doc);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,201 @@
|
|||
/*
|
||||
The contents of this file are subject to the Mozilla Public License
|
||||
Version 1.0 (the "License"); you may not use this file except in
|
||||
compliance with the License. You may obtain a copy of the License at
|
||||
http://www.mozilla.org/MPL/
|
||||
|
||||
Software distributed under the License is distributed on an "AS IS"
|
||||
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
|
||||
the License for the specific language governing rights and limitations
|
||||
under the License.
|
||||
|
||||
The Initial Developer of the Original Code is Sun Microsystems,
|
||||
Inc. Portions created by Sun are Copyright (C) 1999 Sun Microsystems,
|
||||
Inc. All Rights Reserved.
|
||||
*/
|
||||
|
||||
package org.mozilla.dom;
|
||||
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.PrintStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.DocumentType;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
import org.mozilla.dom.test.*;
|
||||
|
||||
public class DOMFactory implements DocumentLoadListener {
|
||||
|
||||
private static final boolean debug = false;
|
||||
|
||||
public DocumentLoadListener getDocumentLoadListener() {
|
||||
return this;
|
||||
}
|
||||
|
||||
public void startURLLoad(String url, String contentType, Document doc) {
|
||||
if (debug)
|
||||
System.err.println("DOM: start URL load - " +
|
||||
url.toString() + " " +
|
||||
contentType);
|
||||
}
|
||||
|
||||
public void endURLLoad(String url, int status, Document doc) {
|
||||
|
||||
|
||||
if (debug)
|
||||
System.err.println("DOM: end URL load - " +
|
||||
url.toString() + " " +
|
||||
Integer.toHexString(status));
|
||||
|
||||
if (url.endsWith(".xul") ||
|
||||
url.endsWith(".js") ||
|
||||
url.endsWith(".css") ||
|
||||
url.startsWith("file:")) return;
|
||||
|
||||
if ((!(url.endsWith(".html"))) && (!(url.endsWith(".xml"))))
|
||||
return;
|
||||
|
||||
if (url.endsWith(".html"))
|
||||
{
|
||||
if (url.indexOf("test.html") == -1) {
|
||||
System.out.println("TestCases Tuned to run with test.html...");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (url.endsWith(".xml"))
|
||||
{
|
||||
if (url.indexOf("test.xml") == -1) {
|
||||
System.out.println("TestCases Tuned to run with test.xml...");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Object obj = (Object) doc;
|
||||
|
||||
TestLoader tl = new TestLoader(obj, 0);
|
||||
if (tl != null) {
|
||||
Object retobj = tl.loadTest();
|
||||
}
|
||||
|
||||
doc = null;
|
||||
}
|
||||
|
||||
public void progressURLLoad(String url, int progress, int progressMax, Document doc) {
|
||||
if (debug)
|
||||
System.err.println("DOM: progress URL load - " +
|
||||
url.toString() + " " +
|
||||
Integer.toString(progress) + "/" +
|
||||
Integer.toString(progressMax));
|
||||
}
|
||||
|
||||
public void statusURLLoad(String url, String message, Document doc) {
|
||||
if (debug)
|
||||
System.err.println("DOM: status URL load - " +
|
||||
url.toString() + " (" +
|
||||
message + ")");
|
||||
}
|
||||
|
||||
public void startDocumentLoad(String url) {
|
||||
if (debug)
|
||||
System.err.println("DOM: start load - " +
|
||||
url.toString());
|
||||
}
|
||||
|
||||
public void endDocumentLoad(String url, int status, Document doc) {
|
||||
if (debug) {
|
||||
System.err.println("DOM: end load - " +
|
||||
url.toString() + " " +
|
||||
Integer.toHexString(status));
|
||||
}
|
||||
}
|
||||
|
||||
private void dump(PrintStream ps, Node node, int indent, boolean mapNode) {
|
||||
ps.println();
|
||||
for (int i=0; i<indent; i++)
|
||||
ps.print(' ');
|
||||
|
||||
ps.print("name=\"" + node.getNodeName() + "\"" +
|
||||
" type=" + dumpType(node.getNodeType()) +
|
||||
" value=\"" + normalize(node.getNodeValue()) + "\"");
|
||||
|
||||
if (mapNode)
|
||||
return;
|
||||
|
||||
NamedNodeMap map = node.getAttributes();
|
||||
dumpMap(ps, map, indent);
|
||||
|
||||
NodeList children = node.getChildNodes();
|
||||
if (children == null)
|
||||
return;
|
||||
int length = children.getLength();
|
||||
for (int i=0; i < length; i++) {
|
||||
dump(ps, children.item(i), indent+2, false);
|
||||
}
|
||||
}
|
||||
|
||||
private void dumpMap(PrintStream ps, NamedNodeMap map, int indent) {
|
||||
if (map == null) return;
|
||||
|
||||
ps.println();
|
||||
int length = map.getLength();
|
||||
if (length > 0) {
|
||||
for (int i=0; i<indent; i++)
|
||||
ps.print(' ');
|
||||
ps.print("------- start attributes -------");
|
||||
}
|
||||
|
||||
for (int i=0; i < length; i++) {
|
||||
Node item = map.item(i);
|
||||
dump(ps, item, indent, true);
|
||||
}
|
||||
|
||||
if (length > 0) {
|
||||
ps.println();
|
||||
for (int i=0; i<indent; i++)
|
||||
ps.print(' ');
|
||||
ps.print("------- end attributes -------");
|
||||
}
|
||||
}
|
||||
|
||||
private static String dumpType(int type) {
|
||||
switch (type) {
|
||||
case Node.ELEMENT_NODE: return "ELEMENT";
|
||||
case Node.ATTRIBUTE_NODE: return "ATTRIBUTE";
|
||||
case Node.TEXT_NODE: return "TEXT";
|
||||
case Node.CDATA_SECTION_NODE: return "CDATA_SECTION";
|
||||
case Node.ENTITY_REFERENCE_NODE: return "ENTITY_REFERENCE";
|
||||
case Node.ENTITY_NODE: return "ENTITY";
|
||||
case Node.PROCESSING_INSTRUCTION_NODE: return "PROCESSING_INSTRUCTION";
|
||||
case Node.COMMENT_NODE: return "COMMENT";
|
||||
case Node.DOCUMENT_NODE: return "DOCUMENT";
|
||||
case Node.DOCUMENT_TYPE_NODE: return "DOCUMENT_TYPE";
|
||||
case Node.DOCUMENT_FRAGMENT_NODE: return "DOCUMENT_FRAGMENT";
|
||||
case Node.NOTATION_NODE: return "NOTATION";
|
||||
}
|
||||
return "ERROR";
|
||||
}
|
||||
|
||||
private static String normalize(String s) {
|
||||
int len = s.length();
|
||||
StringBuffer sb = new StringBuffer(len);
|
||||
char c = ' ';
|
||||
char pc = ' ';
|
||||
for (int i=0; i < len; i++) {
|
||||
c = s.charAt(i);
|
||||
if ((pc == ' ' || pc == '\n' || pc == '\t') &&
|
||||
(c == ' ' || c == '\n' || c == '\t'))
|
||||
continue;
|
||||
sb.append(c);
|
||||
pc = c;
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
/**
|
||||
* @author Raju Pallath
|
||||
* @version 1.0
|
||||
*
|
||||
* A interface which define the execute method. This interface is
|
||||
* implemented by all Test Classes.
|
||||
*
|
||||
*/
|
||||
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
public interface Execution
|
||||
{
|
||||
/**
|
||||
*
|
||||
* @param targetObj Object instance (Node/Document/....)
|
||||
*
|
||||
* @return Return true or false
|
||||
*
|
||||
*/
|
||||
public boolean execute(Object targetObj);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
HOMEDIR=../
|
||||
SRCDIR=$(HOMEDIR)/src
|
||||
CLASSDIR=$(HOMEDIR)/classes
|
||||
|
||||
JAVAC=javac
|
||||
TESTPACKAGE=org/mozilla/dom/test
|
||||
DOMPACKAGE=org/mozilla/dom
|
||||
|
||||
all:
|
||||
@echo "******************************************************"
|
||||
@echo "Make changes to $(SRCDIR)/mozilla.csh"
|
||||
@echo "and source it else it may not compile..."
|
||||
@echo "******************************************************"
|
||||
@echo ""
|
||||
$(JAVAC) -d $(CLASSDIR) $(JAVAFILES)
|
||||
$(JAVAC) -d $(CLASSDIR) $(DOMFILE)
|
||||
cd api; make
|
||||
|
||||
JAVAFILES= Execution.java \
|
||||
BWBaseTest.java \
|
||||
TestLoader.java \
|
||||
ParamCombination.java \
|
||||
ReflectionTest.java \
|
||||
BWJavaTemplate.java
|
||||
|
||||
DOMFILE= DOMFactory.java \
|
||||
DOMAccessorImpl.java
|
||||
|
||||
clean:
|
||||
for i in ${JAVAFILES} ; do \
|
||||
file=$$i; \
|
||||
classfile=`echo $$file | sed 's/java/class/g'` ; \
|
||||
/bin/rm $(CLASSDIR)/$(TESTPACKAGE)/$$classfile ; done
|
||||
/bin/rm $(CLASSDIR)/$(DOMPACKAGE)/DOMFactory.class ;
|
||||
cd api; make clean
|
||||
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
HOMEDIR=../
|
||||
SRCDIR=$(HOMEDIR)/src
|
||||
CLASSDIR=$(HOMEDIR)/classes
|
||||
|
||||
JAVAC=javac
|
||||
TESTPACKAGE=org/mozilla/dom/test
|
||||
DOMPACKAGE=org/mozilla/dom
|
||||
|
||||
all:
|
||||
@echo "******************************************************"
|
||||
@echo "Make changes to $(SRCDIR)/mozilla.csh"
|
||||
@echo "and source it else it may not compile..."
|
||||
@echo "******************************************************"
|
||||
@echo ""
|
||||
$(JAVAC) -d $(CLASSDIR) $(JAVAFILES)
|
||||
$(JAVAC) -d $(CLASSDIR) $(DOMFILE)
|
||||
cd api; make
|
||||
|
||||
JAVAFILES= Execution.java \
|
||||
BWBaseTest.java \
|
||||
TestLoader.java \
|
||||
ParamCombination.java \
|
||||
ReflectionTest.java \
|
||||
BWJavaTemplate.java
|
||||
|
||||
DOMFILE= DOMFactory.java \
|
||||
DOMAccessorImpl.java
|
||||
|
||||
clean:
|
||||
for i in ${JAVAFILES} ; do \
|
||||
file=$$i; \
|
||||
classfile=`echo $$file | sed 's/java/class/g'` ; \
|
||||
/bin/rm $(CLASSDIR)/$(TESTPACKAGE)/$$classfile ; done
|
||||
/bin/rm $(CLASSDIR)/$(DOMPACKAGE)/DOMFactory.class ;
|
||||
cd api; make clean
|
||||
|
||||
|
|
@ -0,0 +1,118 @@
|
|||
/**
|
||||
* @version 1.00 06 Jul 1999
|
||||
* @author Raju Pallath
|
||||
*/
|
||||
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.lang.*;
|
||||
import java.util.*;
|
||||
|
||||
class ParamCombination
|
||||
{
|
||||
Object arrayOfVector[] = null;
|
||||
int totalCombinations = 0;
|
||||
int currIndex = 0;
|
||||
|
||||
/**
|
||||
*
|
||||
* Constructor
|
||||
*
|
||||
* @param paramLength No. of parameters which shall serve as index
|
||||
* to array ofVectors
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
public ParamCombination(int paramLength)
|
||||
{
|
||||
arrayOfVector = new Object[paramLength];
|
||||
if (arrayOfVector == null) return;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* This routine adds a new Vector into arrayOfVector
|
||||
*
|
||||
* @param v Vector class containing values in string format
|
||||
* viz: 0/null/DUMMY_STRING
|
||||
* @return void
|
||||
*
|
||||
*/
|
||||
public void addElement(Vector v)
|
||||
{
|
||||
if (v != null)
|
||||
{
|
||||
arrayOfVector[currIndex++] = v;
|
||||
if (totalCombinations == 0) totalCombinations = v.size();
|
||||
else totalCombinations = totalCombinations * v.size();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* This routine adds a new Vector into arrayOfVector
|
||||
*
|
||||
* @return array of Strings containing all combinations of values in
|
||||
* each Vector in vector array
|
||||
*
|
||||
*/
|
||||
public String[] getValueList()
|
||||
{
|
||||
if (totalCombinations == 0) return null;
|
||||
|
||||
String str[] = new String[totalCombinations];
|
||||
|
||||
int len = arrayOfVector.length;
|
||||
if (len == 1)
|
||||
{
|
||||
Vector v = (Vector)arrayOfVector[0];
|
||||
for (int j=0; j< v.size(); j++)
|
||||
str[j] = (String)v.elementAt(j);
|
||||
return str;
|
||||
}
|
||||
|
||||
Vector tmpVect = (Vector)arrayOfVector[len -1];
|
||||
for (int i=arrayOfVector.length-2; i>= 0; i--)
|
||||
{
|
||||
tmpVect = getCombination((Vector)arrayOfVector[i], tmpVect);
|
||||
}
|
||||
|
||||
for (int i=0; i< tmpVect.size(); i++)
|
||||
{
|
||||
str[i] = (String)tmpVect.elementAt(i);
|
||||
}
|
||||
return str;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get all combinations of values in Vectors v1 and v2
|
||||
*
|
||||
* @param v1 Vector class containing values in string format
|
||||
* viz: 0/null/DUMMY_STRING
|
||||
* @param v2 Vector class containing values in string format
|
||||
* viz: 0/null/DUMMY_STRING
|
||||
* @return vector containing combinations of above values.
|
||||
* viz: null, null
|
||||
* null, DUMMY_STRING
|
||||
* 0, null...
|
||||
*
|
||||
*/
|
||||
private Vector getCombination( Vector v1, Vector v2)
|
||||
{
|
||||
Vector store = new Vector();
|
||||
for (int i=0; i< v1.size(); i++)
|
||||
{
|
||||
String vstr1 = (String)v1.elementAt(i);
|
||||
for (int j=0; j< v2.size(); j++)
|
||||
{
|
||||
String vstr2 = (String)v2.elementAt(j);
|
||||
String newstr = vstr1 + ", " + vstr2;
|
||||
store.addElement(newstr);
|
||||
}
|
||||
}
|
||||
return store;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
|
||||
1) open mozilla.csh
|
||||
|
||||
2) make changes to variables
|
||||
BLACKWOOD_HOME
|
||||
MOZILLA_FIVE_HOME
|
||||
JAVA_HOME
|
||||
TEST_PATH
|
||||
|
||||
3) source mozilla.csh
|
||||
this will set up the environment
|
||||
|
||||
4) Edit BWProperties file and change the locations for variables
|
||||
BW_TESTDIR
|
||||
BW_LOGDIR
|
||||
|
||||
5) Run the Makefile
|
||||
|
||||
6) Copy test.html and test.xml files to your Web-Servers DOCUMENT_ROOT
|
||||
(By default it is assumed that they can be accessed as
|
||||
http://<server name>/text.html).
|
||||
or
|
||||
http://<server name>/~<username>/text.html).
|
||||
|
||||
7) Invoke autorun.sh from command prompt.
|
||||
sh autorun.sh
|
||||
|
||||
8) The results are recorded in HTML file BWTest.html
|
||||
and in log file BWTest.log
|
||||
Individual test Log files are also found in 'log' directory.
|
||||
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
To Invoke a specific test case
|
||||
sh autorun.sh -t org.mozilla.dom.test.AttrImpl_getName
|
||||
|
||||
NOTE: All Test Cases are recorded in file BWTestClass.lst.ORIG
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
|
||||
Assumption:
|
||||
|
||||
I assume that u have copied the files test.xml and test.html to your
|
||||
DOCUMENT_ROOT of your WebServer.
|
||||
The URL it tries to load is http://<servername>/test.html.
|
||||
|
||||
If it is set in users public_html then open file autorun.sh
|
||||
and change DOCROOT accordingly.
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,123 @@
|
|||
/**
|
||||
* @version 1.00 11 Mar 1997
|
||||
* @author Cay Horstmann
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.lang.reflect.*;
|
||||
|
||||
|
||||
public class ReflectionTest
|
||||
{ public static void main(String[] args)
|
||||
{ String name = readLine("Please enter a class name (e.g. java.util.Date): ");
|
||||
try
|
||||
{ Class cl = Class.forName(name);
|
||||
Class supercl = cl.getSuperclass();
|
||||
System.out.print("class " + name);
|
||||
if (supercl != null && !supercl.equals(Object.class))
|
||||
System.out.print(" extends " + supercl.getName());
|
||||
System.out.print("\n{\n");
|
||||
printConstructors(cl);
|
||||
System.out.println();
|
||||
printMethods(cl);
|
||||
System.out.println();
|
||||
printFields(cl);
|
||||
System.out.println("}");
|
||||
}
|
||||
catch(ClassNotFoundException e)
|
||||
{ System.out.println("Class not found.");
|
||||
}
|
||||
}
|
||||
|
||||
public static String readLine(String str)
|
||||
{ int ch;
|
||||
String r = "";
|
||||
boolean done = false;
|
||||
System.out.println(str);
|
||||
while (!done)
|
||||
{ try
|
||||
{ ch = System.in.read();
|
||||
if (ch < 0 || (char)ch == '\n')
|
||||
done = true;
|
||||
else if ((char)ch != '\r') // weird--it used to do \r\n translation
|
||||
r = r + (char) ch;
|
||||
}
|
||||
catch(java.io.IOException e)
|
||||
{ done = true;
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static void printConstructors(Class cl)
|
||||
{ Constructor[] constructors = cl.getDeclaredConstructors();
|
||||
|
||||
for (int i = 0; i < constructors.length; i++)
|
||||
{ Constructor c = constructors[i];
|
||||
Class[] paramTypes = c.getParameterTypes();
|
||||
String name = c.getName();
|
||||
System.out.print(Modifier.toString(c.getModifiers()));
|
||||
System.out.print(" " + name + "(");
|
||||
for (int j = 0; j < paramTypes.length; j++)
|
||||
{ if (j > 0) System.out.print(", ");
|
||||
System.out.print(paramTypes[j].getName());
|
||||
}
|
||||
System.out.println(");");
|
||||
}
|
||||
}
|
||||
|
||||
public static void printMethods(Class cl)
|
||||
{ Method[] methods = cl.getDeclaredMethods();
|
||||
|
||||
for (int i = 0; i < methods.length; i++)
|
||||
{ Method m = methods[i];
|
||||
Class retType = m.getReturnType();
|
||||
Class[] paramTypes = m.getParameterTypes();
|
||||
String name = m.getName();
|
||||
System.out.print(Modifier.toString(m.getModifiers()));
|
||||
System.out.print(" " + retType.getName() + " " + name
|
||||
+ "(");
|
||||
for (int j = 0; j < paramTypes.length; j++)
|
||||
{ if (j > 0) System.out.print(", ");
|
||||
System.out.print(paramTypes[j].getName());
|
||||
}
|
||||
System.out.println(");");
|
||||
}
|
||||
}
|
||||
|
||||
public static void printFields(Class cl)
|
||||
{ Field[] fields = cl.getDeclaredFields();
|
||||
|
||||
for (int i = 0; i < fields.length; i++)
|
||||
{ Field f = fields[i];
|
||||
Class type = f.getType();
|
||||
String name = f.getName();
|
||||
System.out.print(Modifier.toString(f.getModifiers()));
|
||||
System.out.println(" " + type.getName() + " " + name
|
||||
+ ";");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Method[] getMethods(Class cl)
|
||||
{
|
||||
Method[] methods = cl.getDeclaredMethods();
|
||||
return methods;
|
||||
}
|
||||
|
||||
public Class[] getParameters(Method m)
|
||||
{
|
||||
Class[] paramTypes = m.getParameterTypes();
|
||||
return paramTypes;
|
||||
}
|
||||
|
||||
public Constructor[] getConstructors(Class cl)
|
||||
{
|
||||
Constructor[] constructors = cl.getDeclaredConstructors();
|
||||
return constructors;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,525 @@
|
|||
/**
|
||||
****************************************************************************
|
||||
*
|
||||
* @author Raju Pallath
|
||||
* @version 1.0
|
||||
*
|
||||
* this class loads all the Test cases and executes them and returns the
|
||||
* pass/fail status.
|
||||
* The Factory class loads this class and executes all Test Cases
|
||||
* listed in a file whose path is set by env. variable BW_TESTDIR
|
||||
* and filename by itself is set in BW_TESTFILE
|
||||
* This class loops thru' each file entry and tries to execute each test
|
||||
* case.
|
||||
*
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.lang.*;
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
|
||||
public class TestLoader
|
||||
{
|
||||
|
||||
|
||||
/**
|
||||
************************************************************************
|
||||
* Constructor
|
||||
*
|
||||
* @param targetObj Object instance (Node/Document/....)
|
||||
* @param areturnType if 1 then return Object expected
|
||||
* if 0 then no return Object expected
|
||||
*
|
||||
************************************************************************
|
||||
*/
|
||||
public TestLoader(Object obj, int areturnType)
|
||||
{
|
||||
targetObj = obj;
|
||||
returnType = areturnType;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
************************************************************************
|
||||
*
|
||||
* Load all the Test cases specified in file $BLACWOOD_TESTFILE
|
||||
* It reads each entry and creates a runtime instantiation of each class
|
||||
*
|
||||
************************************************************************
|
||||
*
|
||||
*/
|
||||
public Object loadTest()
|
||||
{
|
||||
if (targetObj == null) {
|
||||
System.out.println("Target Object " + targetObj.toString() + " is null....");
|
||||
return null;
|
||||
}
|
||||
|
||||
// Read Property File
|
||||
TestLoader.readPropertyFile();
|
||||
|
||||
String testDir = ".";
|
||||
String testFile = TESTFILE;
|
||||
|
||||
// Set Test directory
|
||||
testDir = propTable.getProperty("BW_TESTDIR");
|
||||
if (testDir == null) testDir=".";
|
||||
|
||||
// Set Test Filename
|
||||
testFile = propTable.getProperty("BW_TESTFILE");
|
||||
if (testFile == null) testFile = TESTFILE;
|
||||
|
||||
String fname = testDir + "/" + testFile;
|
||||
FileInputStream in = null;
|
||||
|
||||
try {
|
||||
in = new FileInputStream(fname);
|
||||
} catch (SecurityException e) {
|
||||
System.out.println ("Security Exception:Could not create stream for file " + fname);
|
||||
return null;
|
||||
} catch (FileNotFoundException e) {
|
||||
System.out.println ("Could not create stream for file " + fname);
|
||||
return null;
|
||||
}
|
||||
|
||||
BufferedReader din;
|
||||
try {
|
||||
din = new BufferedReader(new InputStreamReader(in));
|
||||
} catch (Exception e) {
|
||||
System.out.println ("Could not get Input Reader for file " + fname);
|
||||
return null;
|
||||
}
|
||||
|
||||
String line= new String("");
|
||||
Vector fileVect = new Vector();
|
||||
try {
|
||||
while (line != null)
|
||||
{
|
||||
line = din.readLine();
|
||||
if (line != null)
|
||||
{
|
||||
if (line.charAt(0) == '#')
|
||||
continue;
|
||||
fileVect.addElement(line);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.out.println("could not read Line from file fname...");
|
||||
line=null;
|
||||
}
|
||||
|
||||
try {
|
||||
din.close();
|
||||
} catch (Exception e) {
|
||||
System.out.println ("Could not close file " + fname);
|
||||
return null;
|
||||
}
|
||||
|
||||
for (int i=0; i<fileVect.size(); i++)
|
||||
{
|
||||
String s = (String)fileVect.elementAt(i);
|
||||
|
||||
|
||||
Class c=null;
|
||||
try {
|
||||
c = Class.forName(s);
|
||||
} catch (ClassNotFoundException e) {
|
||||
System.out.println ("Could not find class " + s);
|
||||
continue;
|
||||
}
|
||||
|
||||
Object classObj = null;
|
||||
try {
|
||||
classObj = c.newInstance();
|
||||
} catch (Exception e) {
|
||||
System.out.println ("Could not instantiate class " + s);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (((BWBaseTest)classObj).execute(targetObj)) {
|
||||
txtPrint(s, "PASSED");
|
||||
} else {
|
||||
txtPrint(s, "FAILED");
|
||||
}
|
||||
|
||||
if (returnType == 1)
|
||||
{
|
||||
return (((BWBaseTest)classObj).returnObject());
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*******************************************************************
|
||||
*
|
||||
* Read the property File and update the Property propTable
|
||||
* the Property file BWProperties lists out all en. variables
|
||||
* and their values.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
*******************************************************************
|
||||
*/
|
||||
public static void readPropertyFile()
|
||||
{
|
||||
if (propTable == null)
|
||||
return ;
|
||||
|
||||
// Get Input Stream from Property file
|
||||
FileInputStream fin=null;
|
||||
try {
|
||||
fin = new FileInputStream("./" + PROPERTYFILE);
|
||||
} catch (Exception e) {
|
||||
System.out.println ("Security Exception:Could not create stream for file " + PROPERTYFILE);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
propTable.load(fin);
|
||||
} catch (Exception e) {
|
||||
System.out.println("Could not load property file " + PROPERTYFILE);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
fin.close();
|
||||
} catch (Exception e) {
|
||||
System.out.println("Could not close " + PROPERTYFILE);
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
************************************************************************
|
||||
* Routine which prints to log files and also to STDOUT
|
||||
*
|
||||
* @param msg Message to be logged
|
||||
*
|
||||
* @return void
|
||||
************************************************************************
|
||||
*
|
||||
*/
|
||||
public static void logErrPrint(String msg)
|
||||
{
|
||||
if (msg == null) return;
|
||||
System.out.println(msg);
|
||||
TestLoader.logPrint(msg);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
************************************************************************
|
||||
* Routine which prints to log files
|
||||
*
|
||||
* @param msg Message to be logged
|
||||
*
|
||||
* @return void
|
||||
************************************************************************
|
||||
*
|
||||
*/
|
||||
public static void logPrint(String msg)
|
||||
{
|
||||
|
||||
if (msg == null) return;
|
||||
|
||||
String logDir = propTable.getProperty("BW_LOGDIR");
|
||||
if (logDir == null) logDir = ".";
|
||||
|
||||
String logFile = propTable.getProperty("BW_LOGFILE");
|
||||
if (logFile == null) logFile = LOGFILE;
|
||||
|
||||
|
||||
String fname = logDir + "/" + logFile;
|
||||
|
||||
// Get Output Stream from Log file
|
||||
RandomAccessFile raf=null;
|
||||
try {
|
||||
raf = new RandomAccessFile(fname, "rw");
|
||||
} catch (Exception e) {
|
||||
System.out.println ("Could not open file " + fname);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
long len = raf.length();
|
||||
raf.seek(len);
|
||||
raf.write(msg.getBytes());
|
||||
raf.write("\n".getBytes());
|
||||
} catch (IOException e) {
|
||||
System.out.println("ERROR: Could not write to File " + fname);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
raf.close();
|
||||
} catch (Exception e) {
|
||||
System.out.println("ERROR: Could not close File " + fname);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
************************************************************************
|
||||
* Routine which prints Header for HTML file
|
||||
************************************************************************
|
||||
*
|
||||
*/
|
||||
public static void htmlPrintHeader()
|
||||
{
|
||||
String logDir = propTable.getProperty("BW_LOGDIR");
|
||||
if (logDir == null) logDir = ".";
|
||||
|
||||
String logFile = LOGHTML;
|
||||
|
||||
|
||||
|
||||
String fname = logDir + "/" + logFile;
|
||||
|
||||
File f=null;
|
||||
try {
|
||||
f = new File(logDir, logFile);
|
||||
} catch (Exception e) {
|
||||
System.out.println ("Could not get file Descriptor for file " + fname);
|
||||
return;
|
||||
}
|
||||
|
||||
if (f.exists())
|
||||
{
|
||||
File newf=null;
|
||||
String nom = logFile + ".bak";
|
||||
try {
|
||||
newf = new File(logDir, nom);
|
||||
} catch (Exception e) {
|
||||
System.out.println ("Could not get file Descriptor for file " + nom);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
f.renameTo(newf);
|
||||
} catch (Exception e) {
|
||||
System.out.println ("Could not rename file " + logFile + " to " + nom);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Get Output Stream from Log file
|
||||
RandomAccessFile raf=null;
|
||||
try {
|
||||
raf = new RandomAccessFile(fname, "rw");
|
||||
} catch (Exception e) {
|
||||
System.out.println ("Could not open file " + fname);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
String msg=null;
|
||||
try {
|
||||
raf.seek(0);
|
||||
Date dt = new Date();
|
||||
msg = "<html><head><title>\n";
|
||||
msg = msg + "DOMAPI Core Level 1 Test Status\n";
|
||||
msg = msg + "</title></head><body bgcolor=\"white\">\n";
|
||||
msg = msg + "<center><h1>\n";
|
||||
msg = msg + "DOM API Automated TestRun Results\n";
|
||||
msg = msg + dt.toString();
|
||||
msg = msg + "</h1></center>\n";
|
||||
msg = msg + "<hr noshade>";
|
||||
msg = msg + "<table bgcolor=\"#99FFCC\">\n";
|
||||
msg = msg + "<tr bgcolor=\"#FF6666\">\n";
|
||||
msg = msg + "<td>Test Case</td>\n";
|
||||
msg = msg + "<td>Result</td>\n";
|
||||
msg = msg + "</tr>\n";
|
||||
raf.write(msg.getBytes());
|
||||
raf.write("\n".getBytes());
|
||||
} catch (IOException e) {
|
||||
System.out.println("ERROR: Could not write to File " + fname);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
raf.close();
|
||||
} catch (Exception e) {
|
||||
System.out.println("ERROR: Could not close File " + fname);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
************************************************************************
|
||||
* Routine which prints Footer for HTML file
|
||||
************************************************************************
|
||||
*
|
||||
*/
|
||||
public static void htmlPrintFooter()
|
||||
{
|
||||
String logDir = propTable.getProperty("BW_LOGDIR");
|
||||
if (logDir == null) logDir = ".";
|
||||
|
||||
String logFile = LOGHTML;
|
||||
|
||||
|
||||
String fname = logDir + "/" + logFile;
|
||||
|
||||
// Get Output Stream from Log file
|
||||
RandomAccessFile raf=null;
|
||||
try {
|
||||
raf = new RandomAccessFile(fname, "rw");
|
||||
} catch (Exception e) {
|
||||
System.out.println ("Could not open file " + fname);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
String msg=null;
|
||||
try {
|
||||
long len = raf.length();
|
||||
raf.seek(len);
|
||||
msg = "</table></body></html>\n";
|
||||
raf.write(msg.getBytes());
|
||||
} catch (IOException e) {
|
||||
System.out.println("ERROR: Could not write to File " + fname);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
raf.close();
|
||||
} catch (Exception e) {
|
||||
System.out.println("ERROR: Could not close File " + fname);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
************************************************************************
|
||||
* Routine which prints to HTML files
|
||||
*
|
||||
* @param testCase TestCase name (class name)
|
||||
* @param msg Message to be logged
|
||||
*
|
||||
* @return void
|
||||
************************************************************************
|
||||
*
|
||||
*/
|
||||
public static void htmlPrint(String testCase, String msg)
|
||||
{
|
||||
|
||||
if (msg == null) return;
|
||||
if (testCase == null) return;
|
||||
|
||||
String logDir = propTable.getProperty("BW_LOGDIR");
|
||||
if (logDir == null) logDir = ".";
|
||||
|
||||
String logFile = LOGHTML;
|
||||
|
||||
|
||||
String fname = logDir + "/" + logFile;
|
||||
|
||||
// Get Output Stream from Log file
|
||||
RandomAccessFile raf=null;
|
||||
try {
|
||||
raf = new RandomAccessFile(fname, "rw");
|
||||
} catch (Exception e) {
|
||||
System.out.println ("Could not open file " + fname);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
String msg1 = null;
|
||||
long len = raf.length();
|
||||
raf.seek(len);
|
||||
msg1 = "<tr><td>" + testCase + "</td>\n";
|
||||
msg1 = msg1 + "<td>" + msg + "</td>\n";
|
||||
msg1 = msg1 + "</tr>";
|
||||
raf.write(msg1.getBytes());
|
||||
} catch (IOException e) {
|
||||
System.out.println("ERROR: Could not write to File " + fname);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
raf.close();
|
||||
} catch (Exception e) {
|
||||
System.out.println("ERROR: Could not close File " + fname);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
************************************************************************
|
||||
* Routine which prints to txt file
|
||||
*
|
||||
* @param testCase TestCase name (class name)
|
||||
* @param msg Message to be logged
|
||||
*
|
||||
* @return void
|
||||
************************************************************************
|
||||
*
|
||||
*/
|
||||
public static void txtPrint(String testCase, String msg)
|
||||
{
|
||||
|
||||
if (msg == null) return;
|
||||
if (testCase == null) return;
|
||||
|
||||
String logDir = propTable.getProperty("BW_LOGDIR");
|
||||
if (logDir == null) logDir = ".";
|
||||
|
||||
String logFile = TestLoader.LOGTXT;
|
||||
|
||||
|
||||
String fname = logDir + "/" + logFile;
|
||||
|
||||
// Get Output Stream from Log file
|
||||
RandomAccessFile raf=null;
|
||||
try {
|
||||
raf = new RandomAccessFile(fname, "rw");
|
||||
} catch (Exception e) {
|
||||
System.out.println ("Could not open file " + fname);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
String msg1 = null;
|
||||
long len = raf.length();
|
||||
raf.seek(len);
|
||||
msg1 = testCase + "=" + msg + "\n";
|
||||
raf.write(msg1.getBytes());
|
||||
} catch (IOException e) {
|
||||
System.out.println("ERROR: Could not write to File " + fname);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
raf.close();
|
||||
} catch (Exception e) {
|
||||
System.out.println("ERROR: Could not close File " + fname);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
private Object targetObj;
|
||||
private int returnType;
|
||||
private static String TESTFILE = "BWTestClass.lst";
|
||||
private static String PROPERTYFILE = "BWProperties";
|
||||
private static String LOGFILE = "BWTest.log";
|
||||
private static String LOGHTML = "BWTest.html";
|
||||
private static String LOGTXT = "BWTest.txt";
|
||||
public static Properties propTable = new Properties();
|
||||
}
|
|
@ -0,0 +1,116 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_appendData_String_1 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_appendData_String_1()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
String newstr=" I have appended more text";
|
||||
tn.appendData(newstr);
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null) {
|
||||
TestLoader.logErrPrint("CharacterData could not be appended...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
if (!(getstr.endsWith(newstr)))
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData could not appended ....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_deleteData_int_int_0 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_deleteData_int_int_0()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MIN_VALUE;
|
||||
int count = Integer.MIN_VALUE;
|
||||
tn.deleteData(offset, count);
|
||||
String getstr = tn.getData();
|
||||
|
||||
if (getstr == null) {
|
||||
TestLoader.logErrPrint("CharacterData cannot be null...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
if (!(getstr.endsWith(str)))
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been deleted...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_deleteData_int_int_1 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_deleteData_int_int_1()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MIN_VALUE;
|
||||
int count = Integer.MAX_VALUE;
|
||||
tn.deleteData(offset, count);
|
||||
String getstr = tn.getData();
|
||||
|
||||
if (getstr == null) {
|
||||
TestLoader.logErrPrint("CharacterData cannot be null");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
if (!(getstr.endsWith(str)))
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been deleted...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_deleteData_int_int_2 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_deleteData_int_int_2()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MIN_VALUE;
|
||||
int count = str.length();
|
||||
tn.deleteData(offset, count);
|
||||
String getstr = tn.getData();
|
||||
|
||||
if (getstr == null) {
|
||||
TestLoader.logErrPrint("CharacterData cannot be null");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
if (!(getstr.endsWith(str)))
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been deleted...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_deleteData_int_int_3 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_deleteData_int_int_3()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MAX_VALUE;
|
||||
int count = Integer.MIN_VALUE;
|
||||
tn.deleteData(offset, count);
|
||||
String getstr = tn.getData();
|
||||
|
||||
if (getstr == null) {
|
||||
TestLoader.logErrPrint("CharacterData cannot be null");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
if (!(getstr.endsWith(str)))
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been deleted...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_deleteData_int_int_4 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_deleteData_int_int_4()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MAX_VALUE;
|
||||
int count = Integer.MAX_VALUE;
|
||||
tn.deleteData(offset, count);
|
||||
String getstr = tn.getData();
|
||||
|
||||
if (getstr == null) {
|
||||
TestLoader.logErrPrint("CharacterData cannot be null");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
if (!(getstr.endsWith(str)))
|
||||
{
|
||||
|
||||
TestLoader.logErrPrint("CharacterData should not have been deleted...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_deleteData_int_int_5 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_deleteData_int_int_5()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MAX_VALUE;
|
||||
int count = str.length();
|
||||
tn.deleteData(offset, count);
|
||||
String getstr = tn.getData();
|
||||
|
||||
if (getstr == null) {
|
||||
TestLoader.logErrPrint("CharacterData cannot be null");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
if (!(getstr.endsWith(str)))
|
||||
{
|
||||
|
||||
TestLoader.logErrPrint("CharacterData should not have been deleted...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_deleteData_int_int_6 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_deleteData_int_int_6()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = 1;
|
||||
int count = Integer.MIN_VALUE;
|
||||
tn.deleteData(offset, count);
|
||||
String getstr = tn.getData();
|
||||
|
||||
if (getstr == null) {
|
||||
TestLoader.logErrPrint("CharacterData cannot be null");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
if (!(getstr.endsWith(str)))
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been deleted...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_deleteData_int_int_7 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_deleteData_int_int_7()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = 1;
|
||||
int count = Integer.MAX_VALUE;
|
||||
tn.deleteData(offset, count);
|
||||
String getstr = tn.getData();
|
||||
|
||||
if (getstr == null) {
|
||||
TestLoader.logErrPrint("CharacterData cannot be null");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
if (getstr.endsWith(str))
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should have been deleted...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_deleteData_int_int_8 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_deleteData_int_int_8()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = 0;
|
||||
int count = str.length();
|
||||
tn.deleteData(offset, count);
|
||||
String getstr = tn.getData();
|
||||
|
||||
if (getstr == null) {
|
||||
TestLoader.logErrPrint("CharacterData cannot be null");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
if ((getstr.endsWith(str)))
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should have been deleted...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,114 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_getData extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_getData()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
String getstr = tn.getData();
|
||||
|
||||
if (getstr == null) {
|
||||
TestLoader.logErrPrint("Character getData cannot be null");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
if (getstr.compareTo(str) != 0)
|
||||
{
|
||||
TestLoader.logErrPrint("Character getData failed...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,111 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_getLength extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_getLength()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int origlen = str.length();
|
||||
String getstr = tn.getData();
|
||||
int newlen = getstr.length();
|
||||
|
||||
if (newlen != origlen) {
|
||||
TestLoader.logErrPrint("Character getLength failed...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_insertData_int_String_0 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_insertData_int_String_0()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MIN_VALUE;
|
||||
String newstr = null;
|
||||
tn.insertData(offset, newstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null) {
|
||||
TestLoader.logErrPrint("CharacterData cannot be null");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
if (getstr.compareTo(str) != 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been inserted...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_insertData_int_String_1 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_insertData_int_String_1()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MAX_VALUE;
|
||||
String newstr = null;
|
||||
tn.insertData(offset, newstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null) {
|
||||
TestLoader.logErrPrint("CharacterData cannot be null");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
if (getstr.compareTo(str) != 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should have been inserted...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_insertData_int_String_2 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_insertData_int_String_2()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = 0;
|
||||
String newstr = null;
|
||||
tn.insertData(offset, newstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null) {
|
||||
TestLoader.logErrPrint("CharacterData cannot be null");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
if (getstr.compareTo(str) != 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been inserted...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_insertData_int_String_3 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_insertData_int_String_3()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MIN_VALUE;
|
||||
String newstr = "Inserted Text";
|
||||
tn.insertData(offset, newstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null) {
|
||||
TestLoader.logErrPrint("CharacterData cannot be null");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
if (getstr.compareTo(str) != 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been inserted...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_insertData_int_String_4 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_insertData_int_String_4()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MAX_VALUE;
|
||||
String newstr = "Inserted Text";
|
||||
tn.insertData(offset, newstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null) {
|
||||
TestLoader.logErrPrint("CharacterData cannot be null");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
if (getstr.compareTo(str) != 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been inserted...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_insertData_int_String_5 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_insertData_int_String_5()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = 0;
|
||||
String newstr = "Inserted Text";
|
||||
tn.insertData(offset, newstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null) {
|
||||
TestLoader.logErrPrint("CharacterData cannot be null");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
if (getstr.compareTo(str) == 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should have been inserted...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_replaceData_int_int_String_0 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_replaceData_int_int_String_0()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MIN_VALUE;
|
||||
int count = Integer.MIN_VALUE;
|
||||
String repstr=null;
|
||||
tn.replaceData(offset, count, repstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
if (getstr.compareTo(str) != 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been replaced....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,124 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_replaceData_int_int_String_1 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_replaceData_int_int_String_1()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MIN_VALUE;
|
||||
int count = Integer.MIN_VALUE;
|
||||
String repstr="Replaced String";
|
||||
tn.replaceData(offset, count, repstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
System.out.println("getstr is " + getstr);
|
||||
System.out.println("str is " + str);
|
||||
|
||||
if (getstr.compareTo(str) != 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been replaced....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_replaceData_int_int_String_10 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_replaceData_int_int_String_10()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MIN_VALUE;
|
||||
int count = Integer.MAX_VALUE;
|
||||
String repstr=null;
|
||||
tn.replaceData(offset, count, repstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
if (getstr.compareTo(str) != 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been replaced....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,127 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_replaceData_int_int_String_11 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_replaceData_int_int_String_11()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MIN_VALUE;
|
||||
int count = Integer.MAX_VALUE;
|
||||
String repstr="Replaced Text";
|
||||
tn.replaceData(offset, count, repstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
System.out.println("offset is " + offset + " count is " + count);
|
||||
int x = offset + count;
|
||||
System.out.println("x is " + x);
|
||||
System.out.println("getstr is " + getstr);
|
||||
System.out.println("str is " + str);
|
||||
|
||||
if (getstr.compareTo(str) == 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should have been replaced....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_replaceData_int_int_String_12 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_replaceData_int_int_String_12()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MIN_VALUE;
|
||||
int count = str.length();
|
||||
String repstr=null;
|
||||
tn.replaceData(offset, count, repstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
if (getstr.compareTo(str) != 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been replaced....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,127 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_replaceData_int_int_String_13 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_replaceData_int_int_String_13()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MIN_VALUE;
|
||||
int count = str.length();
|
||||
String repstr="Replaced Text";
|
||||
tn.replaceData(offset, count, repstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
System.out.println("offset is " + offset + " count is " + count);
|
||||
int x = offset + count;
|
||||
System.out.println("x is " + x);
|
||||
System.out.println("getstr is " + getstr);
|
||||
System.out.println("str is " + str);
|
||||
|
||||
if (getstr.compareTo(str) != 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been replaced....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_replaceData_int_int_String_14 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_replaceData_int_int_String_14()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MAX_VALUE;
|
||||
int count = Integer.MIN_VALUE;
|
||||
String repstr=null;
|
||||
tn.replaceData(offset, count, repstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
if (getstr.compareTo(str) != 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been replaced....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,128 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_replaceData_int_int_String_15 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_replaceData_int_int_String_15()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MAX_VALUE;
|
||||
int count = Integer.MIN_VALUE;
|
||||
String repstr="Replaced Text";
|
||||
tn.replaceData(offset, count, repstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
|
||||
System.out.println("offset is " + offset + " count is " + count);
|
||||
int x = offset + count;
|
||||
System.out.println("x is " + x);
|
||||
System.out.println("getstr is " + getstr);
|
||||
System.out.println("str is " + str);
|
||||
|
||||
if (getstr.compareTo(str) != 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been replaced....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_replaceData_int_int_String_16 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_replaceData_int_int_String_16()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MAX_VALUE;
|
||||
int count = Integer.MAX_VALUE;
|
||||
String repstr=null;
|
||||
tn.replaceData(offset, count, repstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
if (getstr.compareTo(str) != 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been replaced....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,126 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_replaceData_int_int_String_17 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_replaceData_int_int_String_17()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MAX_VALUE;
|
||||
int count = Integer.MAX_VALUE;
|
||||
String repstr="Replaced Text";
|
||||
tn.replaceData(offset, count, repstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
System.out.println("offset is " + offset + " count is " + count);
|
||||
int x = offset + count;
|
||||
System.out.println("x is " + x);
|
||||
System.out.println("getstr is " + getstr);
|
||||
System.out.println("str is " + str);
|
||||
if (getstr.compareTo(str) == 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should have been replaced....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_replaceData_int_int_String_2 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_replaceData_int_int_String_2()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MAX_VALUE;
|
||||
int count = str.length();
|
||||
String repstr=null;
|
||||
tn.replaceData(offset, count, repstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
if (getstr.compareTo(str) == 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should have been replaced....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_replaceData_int_int_String_3 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_replaceData_int_int_String_3()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MAX_VALUE;
|
||||
int count = str.length();
|
||||
String repstr="Replaced Text";
|
||||
tn.replaceData(offset, count, repstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
if (getstr.compareTo(str) == 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should have been replaced....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_replaceData_int_int_String_4 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_replaceData_int_int_String_4()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = 0;
|
||||
int count = Integer.MIN_VALUE;
|
||||
String repstr=null;
|
||||
tn.replaceData(offset, count, repstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
if (getstr.compareTo(str) != 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been replaced....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,127 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_replaceData_int_int_String_5 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_replaceData_int_int_String_5()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = 0;
|
||||
int count = Integer.MIN_VALUE;
|
||||
String repstr="Replaced Text";
|
||||
tn.replaceData(offset, count, repstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
System.out.println("offset is " + offset + " count is " + count);
|
||||
int x = offset + count;
|
||||
System.out.println("x is " + x);
|
||||
System.out.println("getstr is " + getstr);
|
||||
System.out.println("str is " + str);
|
||||
|
||||
if (getstr.compareTo(str) != 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been replaced....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_replaceData_int_int_String_6 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_replaceData_int_int_String_6()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = 0;
|
||||
int count = Integer.MAX_VALUE;
|
||||
String repstr=null;
|
||||
tn.replaceData(offset, count, repstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
if (getstr.compareTo(str) != 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been replaced....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_replaceData_int_int_String_7 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_replaceData_int_int_String_7()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = 0;
|
||||
int count = Integer.MAX_VALUE;
|
||||
String repstr="Replaced Text";
|
||||
tn.replaceData(offset, count, repstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
if (getstr.compareTo(str) == 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should have been replaced....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_replaceData_int_int_String_8 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_replaceData_int_int_String_8()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = 0;
|
||||
int count = str.length();
|
||||
String repstr=null;
|
||||
tn.replaceData(offset, count, repstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
if (getstr.compareTo(str) != 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been replaced....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_replaceData_int_int_String_9 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_replaceData_int_int_String_9()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = 0;
|
||||
int count = str.length();
|
||||
String repstr="Replaced Text";
|
||||
tn.replaceData(offset, count, repstr);
|
||||
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should not have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
if (!(getstr.startsWith(repstr)))
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData should have been replaced....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,111 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_setData_String_0 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_setData_String_0()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
String newstr=null;
|
||||
tn.setData(newstr);
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null) {
|
||||
TestLoader.logErrPrint("charcterData cannot be set to null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,116 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_setData_String_1 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_setData_String_1()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
String newstr="Original Text is replaced wiht this text";
|
||||
tn.setData(newstr);
|
||||
String getstr = tn.getData();
|
||||
if (getstr == null) {
|
||||
TestLoader.logErrPrint("charcterData not set ....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
if (getstr.compareTo(newstr) != 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData not set ....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_substringData_int_int_0 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_substringData_int_int_0()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MIN_VALUE;
|
||||
int count = Integer.MIN_VALUE;
|
||||
|
||||
String getstr = tn.substringData(offset, count);
|
||||
if (getstr != null) {
|
||||
TestLoader.logErrPrint("CharacterData should have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
|
||||
System.out.println("offset is " + offset + " count is " + count);
|
||||
int x = offset + count;
|
||||
System.out.println("x is " + x);
|
||||
System.out.println("getstr is " + getstr);
|
||||
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_substringData_int_int_1 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_substringData_int_int_1()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MIN_VALUE;
|
||||
int count = Integer.MAX_VALUE;
|
||||
|
||||
String getstr = tn.substringData(offset, count);
|
||||
if (getstr != null) {
|
||||
TestLoader.logErrPrint("CharacterData should have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
System.out.println("offset is " + offset + " count is " + count);
|
||||
int x = offset + count;
|
||||
System.out.println("x is " + x);
|
||||
System.out.println("getstr is " + getstr);
|
||||
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_substringData_int_int_2 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_substringData_int_int_2()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MIN_VALUE;
|
||||
int count = str.length();
|
||||
|
||||
String getstr = tn.substringData(offset, count);
|
||||
if (getstr != null) {
|
||||
TestLoader.logErrPrint("CharacterData should have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
System.out.println("offset is " + offset + " count is " + count);
|
||||
int x = offset + count;
|
||||
System.out.println("x is " + x);
|
||||
System.out.println("getstr is " + getstr);
|
||||
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_substringData_int_int_3 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_substringData_int_int_3()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MAX_VALUE;
|
||||
int count = Integer.MIN_VALUE;
|
||||
|
||||
String getstr = tn.substringData(offset, count);
|
||||
if (getstr != null) {
|
||||
TestLoader.logErrPrint("CharacterData should have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
System.out.println("offset is " + offset + " count is " + count);
|
||||
int x = offset + count;
|
||||
System.out.println("x is " + x);
|
||||
System.out.println("getstr is " + getstr);
|
||||
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_substringData_int_int_4 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_substringData_int_int_4()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MAX_VALUE;
|
||||
int count = Integer.MAX_VALUE;
|
||||
|
||||
String getstr = tn.substringData(offset, count);
|
||||
if (getstr != null) {
|
||||
TestLoader.logErrPrint("CharacterData should have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
System.out.println("offset is " + offset + " count is " + count);
|
||||
int x = offset + count;
|
||||
System.out.println("x is " + x);
|
||||
System.out.println("getstr is " + getstr);
|
||||
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_substringData_int_int_5 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_substringData_int_int_5()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = Integer.MAX_VALUE;
|
||||
int count = str.length();
|
||||
|
||||
String getstr = tn.substringData(offset, count);
|
||||
if (getstr != null) {
|
||||
TestLoader.logErrPrint("CharacterData should have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
System.out.println("offset is " + offset + " count is " + count);
|
||||
int x = offset + count;
|
||||
System.out.println("x is " + x);
|
||||
System.out.println("getstr is " + getstr);
|
||||
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_substringData_int_int_6 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_substringData_int_int_6()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = 0;
|
||||
int count = Integer.MIN_VALUE;
|
||||
|
||||
String getstr = tn.substringData(offset, count);
|
||||
System.out.println("offset is " + offset + " count is " + count);
|
||||
int x = offset + count;
|
||||
System.out.println("x is " + x);
|
||||
if (getstr != null) {
|
||||
TestLoader.logErrPrint("CharacterData should have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
System.out.println("getstr is " + getstr);
|
||||
|
||||
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_substringData_int_int_7 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_substringData_int_int_7()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = 0;
|
||||
int count = Integer.MAX_VALUE;
|
||||
|
||||
String getstr = tn.substringData(offset, count);
|
||||
if (getstr == null) {
|
||||
TestLoader.logErrPrint("CharacterData should not be null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
System.out.println("offset is " + offset + " count is " + count);
|
||||
int x = offset + count;
|
||||
System.out.println("x is " + x);
|
||||
System.out.println("getstr is " + getstr);
|
||||
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,118 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class CharacterDataImpl_substringData_int_int_8 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public CharacterDataImpl_substringData_int_int_8()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "Creating a new Text Node";
|
||||
Text tn = d.createTextNode(str);
|
||||
if (tn == null) {
|
||||
TestLoader.logErrPrint("Could not Create TextNode " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
int offset = 0;
|
||||
int count = str.length();
|
||||
|
||||
String getstr = tn.substringData(offset, count);
|
||||
if (getstr == null) {
|
||||
TestLoader.logErrPrint("CharacterData should have been null....");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
if (getstr.compareTo(str) != 0)
|
||||
{
|
||||
TestLoader.logErrPrint("CharacterData substring not extracted correctly...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,110 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
* Tests out the Document->DOMImplementation->hasFeature() method.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DOMImplementationImpl_hasFeature_String_String_0 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DOMImplementationImpl_hasFeature_String_String_0()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logErrPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
DOMImplementationImpl di = (DOMImplementationImpl)d.getImplementation();
|
||||
if (di == null) {
|
||||
TestLoader.logErrPrint("Document DomImplementation is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
if (di.hasFeature(null, null)) {
|
||||
System.out.println("DomImplementation 'hasFeature(null, null) Failed..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
System.out.println("DomImplementation 'hasFeature(null, null)' Passed..");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
* This is an Auto-generated Test Case.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DOMImplementationImpl_hasFeature_String_String_1 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DOMImplementationImpl_hasFeature_String_String_1()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logErrPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
DOMImplementation di = d.getImplementation();
|
||||
if (di == null) {
|
||||
TestLoader.logErrPrint("Document DomImplementation is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
if (di.hasFeature("HTML", null))
|
||||
{
|
||||
System.out.println("DomImplementation 'hasFeature(HTML, null)' Failed..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Doument is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
* This is an Auto-generated Test Case.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DOMImplementationImpl_hasFeature_String_String_2 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DOMImplementationImpl_hasFeature_String_String_2()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logErrPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
DOMImplementation di = d.getImplementation();
|
||||
if (di == null) {
|
||||
TestLoader.logErrPrint("Document DomImplementation is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
if (di.hasFeature(null, "1.0"))
|
||||
{
|
||||
System.out.println("DomImplementation 'hasFeature(null, 1.0)' Failed..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Doument is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,110 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
* Tests out the Document->DOMImplementation->hasFeature() method.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DOMImplementationImpl_hasFeature_String_String_3 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DOMImplementationImpl_hasFeature_String_String_3()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logErrPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
DOMImplementation di = d.getImplementation();
|
||||
if (di == null) {
|
||||
TestLoader.logErrPrint("Document DomImplementation is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
if (di.hasFeature("HTML", "1.0"))
|
||||
System.out.println("DomImplementation 'hasFeature(HTMl,1.0) Passed ..");
|
||||
else {
|
||||
System.out.println("DomImplementation 'hasFeature(HTMl,1.0) Failed ..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,110 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
* Tests out the Document->DOMImplementation->hasFeature() method.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DOMImplementationImpl_hasFeature_String_String_4 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DOMImplementationImpl_hasFeature_String_String_4()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logErrPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
DOMImplementation di = d.getImplementation();
|
||||
if (di == null) {
|
||||
TestLoader.logErrPrint("Document DomImplementation is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
if (di.hasFeature("XML", "1.0"))
|
||||
System.out.println("DomImplementation 'hasFeature(XML,1.0) Passed ..");
|
||||
else {
|
||||
System.out.println("DomImplementation 'hasFeature(XML,1.0) Failed ..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
* Tests out the Document->createAttribute(null) method.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentImpl_createAttribute_String_0 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_createAttribute_String_0()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
Attr dca = d.createAttribute(null);
|
||||
if (dca != null) {
|
||||
TestLoader.logErrPrint("Document 'createAttribute(null)' is not NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
TestLoader.logErrPrint("Document 'createAttribute(null)' is NULL..");
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
* Tests out the DocumentImpl->createAttribute() method.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentImpl_createAttribute_String_1 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_createAttribute_String_1()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
Attr da = d.createAttribute("dummyattr");
|
||||
if (da == null) {
|
||||
TestLoader.logErrPrint("Document 'createAttribute(dummyattr)' is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
TestLoader.logErrPrint("Document 'createAttribute(dummyattr)' is NOT NULL..");
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
* Creates a CDATASection node whose value is the specified string.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentImpl_createCDATASection_String_0 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_createCDATASection_String_0()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = null;
|
||||
CDATASection c = d.createCDATASection(str);
|
||||
if (c != null) {
|
||||
TestLoader.logErrPrint("Could Create CDATA Section with null String..." );
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentImpl_createCDATASection_String_1 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_createCDATASection_String_1()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "This is totally a character <data>";
|
||||
CDATASection c = d.createCDATASection(str);
|
||||
if (c == null) {
|
||||
TestLoader.logErrPrint("Could not Create CDATA Section with String " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
* Tests out the Document->createComment() method.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentImpl_createComment_String_0 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_createComment_String_0()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
Comment dc = d.createComment(null);
|
||||
if (dc != null) {
|
||||
TestLoader.logErrPrint("Document 'createCommnet(null) is not NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
TestLoader.logErrPrint("Document 'createComment(null) is NULL..");
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
* Tests out the Document->createComment("dummy comment string") method.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentImpl_createComment_String_1 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_createComment_String_1()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
Comment dc = d.createComment("dummy comment string");
|
||||
if (dc == null) {
|
||||
TestLoader.logErrPrint("Document 'createCommnet(dummy)' is not NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
TestLoader.logErrPrint("Document 'createComment(dummy)' is NULL..");
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
* Tests out the Document->createDocumentFragment() method
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentImpl_createDocumentFragment extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_createDocumentFragment()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
DocumentFragment df = d.createDocumentFragment();
|
||||
if (df == null) {
|
||||
TestLoader.logErrPrint("Document 'createDocumentFragment()' is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
TestLoader.logErrPrint("Document 'createComment(dummy)' is not NULL..");
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
* Tests out the Document->createElement(String) method.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentImpl_createElement_String_0 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_createElement_String_0()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
Element e = d.createElement(null);
|
||||
if (e != null) {
|
||||
TestLoader.logErrPrint("Document 'createElement(null) is not NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
TestLoader.logErrPrint("Document 'createComment(null)' is NULL..");
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
* Tests out the Document->createElement("HR") method.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentImpl_createElement_String_1 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_createElement_String_1()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
Element e = d.createElement("HR");
|
||||
if (e == null) {
|
||||
TestLoader.logErrPrint("Document 'createElement(HR) is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
TestLoader.logErrPrint("Document 'createElement(HR)' is not NULL..");
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentImpl_createEntityReference_String_0 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_createEntityReference_String_0()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = null;
|
||||
EntityReference er = d.createEntityReference(str);
|
||||
if (er != null) {
|
||||
TestLoader.logErrPrint("Could not Create EntityReference with NULL name");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentImpl_createEntityReference_String_1 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_createEntityReference_String_1()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String str = "newEntity";
|
||||
EntityReference er = d.createEntityReference(str);
|
||||
if (er == null) {
|
||||
TestLoader.logErrPrint("Could not Create EntityReference with name " + str);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentImpl_createProcessingInstruction_String_String_0 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_createProcessingInstruction_String_String_0()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String target = null;
|
||||
String data = null;
|
||||
ProcessingInstruction pi = d.createProcessingInstruction(target, data);
|
||||
if (pi != null) {
|
||||
TestLoader.logErrPrint("Could Create ProcessingInstruction with target and data set to NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentImpl_createProcessingInstruction_String_String_1 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_createProcessingInstruction_String_String_1()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String target = "xml";
|
||||
String data = null;
|
||||
ProcessingInstruction pi = d.createProcessingInstruction(target, data);
|
||||
if (pi != null) {
|
||||
TestLoader.logErrPrint("Could Create ProcessingInstruction with target " + target + " and data set to NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentImpl_createProcessingInstruction_String_String_2 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_createProcessingInstruction_String_String_2()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String target = null;
|
||||
String data = "version=\"1.0\"";
|
||||
ProcessingInstruction pi = d.createProcessingInstruction(target, data);
|
||||
if (pi != null) {
|
||||
TestLoader.logErrPrint("Could Create ProcessingInstruction with target set to NULL and data set to " + data);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentImpl_createProcessingInstruction_String_String_3 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_createProcessingInstruction_String_String_3()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
String target = "xml";
|
||||
String data = "version=\"1.0\"";
|
||||
ProcessingInstruction pi = d.createProcessingInstruction(target, data);
|
||||
if (pi == null) {
|
||||
TestLoader.logErrPrint("Could Not Create ProcessingInstruction with target " + target + " and data set to " + data);
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
* Tests out the Document->createTextNode(String) method.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentImpl_createTextNode_String_0 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_createTextNode_String_0()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
Text t = d.createTextNode(null);
|
||||
if (t != null) {
|
||||
TestLoader.logErrPrint("Document 'createTextNode(null) is not NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
TestLoader.logErrPrint("Document 'createTextNode(null)' is NULL..");
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
* Tests out the Document->createTextNode(String) method.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentImpl_createTextNode_String_1 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_createTextNode_String_1()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
Text t = d.createTextNode("mytxt");
|
||||
if (t == null) {
|
||||
TestLoader.logErrPrint("Document 'createTextNode(mytxt) is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
TestLoader.logErrPrint("Document 'createTextNode(mytxt)' is not NULL..");
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
* Tests out the DocumentImpl->getDocType() method.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentImpl_getDoctype extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_getDoctype()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
DocumentType dt = d.getDoctype();
|
||||
if (dt == null) {
|
||||
TestLoader.logErrPrint("Document Type is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
TestLoader.logErrPrint("Document Type is " + dt.getName());
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
* Tests out the DocumentImpl->getDocumentElement() method.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentImpl_getDocumentElement extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_getDocumentElement()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
Element e = d.getDocumentElement();
|
||||
if (e == null) {
|
||||
TestLoader.logErrPrint("Document Element is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
TestLoader.logErrPrint("Document Element is " + e.getTagName());
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
* Tests out the DocumentImpl->getElementsByTagName() method.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentImpl_getElementsByTagName_String_0 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_getElementsByTagName_String_0()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
NodeList dt = d.getElementsByTagName(null);
|
||||
if (dt != null) {
|
||||
TestLoader.logErrPrint("Document 'getElementsByTagName(null)' is NOT NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
TestLoader.logErrPrint("Document 'getElementsByTagName(null)' is NULL..");
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
* Tests out the DocumentImpl->getElementsByTagName("*") method.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentImpl_getElementsByTagName_String_1 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_getElementsByTagName_String_1()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
NodeList dt = d.getElementsByTagName("*");
|
||||
if (dt == null) {
|
||||
TestLoader.logErrPrint("Document 'getElementsByTagName(*)' is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
TestLoader.logErrPrint("Document 'getElementsByTagName(*)' is NOT NULL..");
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentImpl_getImplementation extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentImpl_getImplementation()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
DOMImplementation dt = d.getImplementation();
|
||||
if (dt == null) {
|
||||
TestLoader.logErrPrint("Document Implementation is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
TestLoader.logErrPrint("Document Implementation is NOT NULL...");
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,109 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
* Tests out the Document->DocumentType->getEntities() method.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentTypeImpl_getEntities extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentTypeImpl_getEntities()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
DocumentType dt = d.getDoctype();
|
||||
if (dt == null) {
|
||||
TestLoader.logErrPrint("Document Type is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
NamedNodeMap nmap = dt.getEntities();
|
||||
if (nmap == null)
|
||||
TestLoader.logErrPrint("DocumentType 'getEntities' is NULL...");
|
||||
else
|
||||
TestLoader.logErrPrint("DocumentType 'getEntities' is Not NULL...");
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,109 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
* Tests out the Document->DocumentType->getName() method.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentTypeImpl_getName extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentTypeImpl_getName()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
DocumentType dt = d.getDoctype();
|
||||
if (dt == null) {
|
||||
TestLoader.logErrPrint("Document Type is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
String name = dt.getName();
|
||||
if (name == null) {
|
||||
TestLoader.logErrPrint("DocumentType 'getName' is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
} else
|
||||
TestLoader.logErrPrint("DocumentType 'getName' is " + name);
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
* Tests out the Document->DocumentType->getNotations() method.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class DocumentTypeImpl_getNotations extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public DocumentTypeImpl_getNotations()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
DocumentType dt = d.getDoctype();
|
||||
if (dt == null) {
|
||||
TestLoader.logErrPrint("Document Type is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
NamedNodeMap nmap = dt.getNotations();
|
||||
if (nmap == null)
|
||||
TestLoader.logErrPrint("DocumentType 'getNotations' is NULL...");
|
||||
else
|
||||
TestLoader.logErrPrint("DocumentType 'getNotations' is Not NULL...");
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,109 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
* Tests out the ElementImpl->getAttributeNode(null) method.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class ElementImpl_getAttributeNode_String_0 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public ElementImpl_getAttributeNode_String_0()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
Element e = d.getDocumentElement();
|
||||
if (e == null) {
|
||||
TestLoader.logErrPrint("Document Element is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
Attr a = e.getAttributeNode(null);
|
||||
if (a != null) {
|
||||
TestLoader.logErrPrint("Element 'getAttributeNode(null) FAILED... ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,110 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
* Tests out the ElementImpl->getAttributeNode(String) method.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class ElementImpl_getAttributeNode_String_1 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public ElementImpl_getAttributeNode_String_1()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
Element e = d.getDocumentElement();
|
||||
if (e == null) {
|
||||
TestLoader.logErrPrint("Document Element is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
e.setAttribute("dummyattr", "1");
|
||||
Attr a = e.getAttributeNode("dummyattr");
|
||||
if (a == null) {
|
||||
TestLoader.logErrPrint("Element 'getAttributeNode(dummyattr) FAILED... ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,110 @@
|
|||
/**
|
||||
*
|
||||
* @version 1.00
|
||||
* @author Raju Pallath
|
||||
*
|
||||
* TESTID
|
||||
*
|
||||
* Tests out the ElementImpl->getAttribute(null) method.
|
||||
*
|
||||
*/
|
||||
package org.mozilla.dom.test;
|
||||
|
||||
import java.util.*;
|
||||
import java.io.*;
|
||||
import org.mozilla.dom.test.*;
|
||||
import org.mozilla.dom.*;
|
||||
import org.w3c.dom.*;
|
||||
|
||||
public class ElementImpl_getAttribute_String_0 extends BWBaseTest implements Execution
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Constructor
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
public ElementImpl_getAttribute_String_0()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Starting point of application
|
||||
*
|
||||
* @param args Array of command line arguments
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public static void main(String[] args)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
***********************************************************
|
||||
*
|
||||
* Execute Method
|
||||
*
|
||||
* @param tobj Object reference (Node/Document/...)
|
||||
* @return true or false depending on whether test passed or failed.
|
||||
*
|
||||
***********************************************************
|
||||
*/
|
||||
public boolean execute(Object tobj)
|
||||
{
|
||||
if (tobj == null) {
|
||||
TestLoader.logPrint("Object is NULL...");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
String os = System.getProperty("OS");
|
||||
osRoutine(os);
|
||||
|
||||
Document d = (Document)tobj;
|
||||
if (d != null)
|
||||
{
|
||||
Element e = d.getDocumentElement();
|
||||
if (e == null) {
|
||||
TestLoader.logErrPrint("Document Element is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
} else {
|
||||
String str = e.getAttribute(null);
|
||||
if (str != null) {
|
||||
TestLoader.logErrPrint("Element 'getAttribute(null) FAILED... ");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
System.out.println("Document is NULL..");
|
||||
return BWBaseTest.FAILED;
|
||||
}
|
||||
|
||||
return BWBaseTest.PASSED;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
***********************************************************
|
||||
* Routine where OS specific checks are made.
|
||||
*
|
||||
* @param os OS Name (SunOS/Linus/MacOS/...)
|
||||
***********************************************************
|
||||
*
|
||||
*/
|
||||
private void osRoutine(String os)
|
||||
{
|
||||
if(os == null) return;
|
||||
|
||||
os = os.trim();
|
||||
if(os.compareTo("SunOS") == 0) {}
|
||||
else if(os.compareTo("Linux") == 0) {}
|
||||
else if(os.compareTo("Windows") == 0) {}
|
||||
else if(os.compareTo("MacOS") == 0) {}
|
||||
else {}
|
||||
}
|
||||
}
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче