*** empty log message ***

git-svn-id: svn://10.0.0.236/trunk@45554 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
leila.garin%eng.sun.com
1999-09-01 23:17:55 +00:00
parent a77676c65e
commit 9673f06f0e
179 changed files with 21320 additions and 0 deletions

View File

@@ -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 ProcessingInstructionImpl_getData extends BWBaseTest implements Execution
{
/**
*
***********************************************************
* Constructor
***********************************************************
*
*/
public ProcessingInstructionImpl_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 target="xml";
String data="version=\"1.0\"";
ProcessingInstruction pi = d.createProcessingInstruction(target, data);
if (pi == null) {
TestLoader.logErrPrint("Could not Create Processing Instruction with target " + target + " and data " + data);
return BWBaseTest.FAILED;
} else {
String str = pi.getData();
if (str == null) {
TestLoader.logErrPrint("Processing instruction 'getData()' is NULL ...");
return BWBaseTest.FAILED;
}
System.out.println("getData is " + str);
if (str.compareTo(data) != 0)
{
TestLoader.logErrPrint("Processing instruction 'getData()' value is incorrect ...");
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 {}
}
}