forked from mozilla/gecko-dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
leila.garin%eng.sun.com
committed
Sep 1, 1999
1 parent
25dd999
commit 0e24dc8
Showing
6 changed files
with
715 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
/** | ||
* | ||
* @version 1.00 | ||
* @author Raju Pallath | ||
* | ||
* TESTID | ||
* | ||
* Tests out the AttrImpl->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 AttrImpl_getName extends BWBaseTest implements Execution | ||
{ | ||
|
||
/** | ||
* | ||
*********************************************************** | ||
* Constructor | ||
*********************************************************** | ||
* | ||
*/ | ||
public AttrImpl_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) | ||
{ | ||
Attr a = d.createAttribute("dummyattr"); | ||
if (a == null) { | ||
TestLoader.logErrPrint("Could not Create Attribute .."); | ||
return BWBaseTest.FAILED; | ||
} else { | ||
String str = a.getName(); | ||
if (str == null) { | ||
TestLoader.logErrPrint("Attr 'getName()' is NULL ..."); | ||
return BWBaseTest.FAILED; | ||
} | ||
|
||
if (str.compareTo("dummyattr") != 0) | ||
{ | ||
TestLoader.logErrPrint("Attr 'getName()' 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 {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
/** | ||
* | ||
* @version 1.00 | ||
* @author Raju Pallath | ||
* | ||
* TESTID | ||
* | ||
* Tests out the AttrImpl->getSpecified() 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 AttrImpl_getSpecified extends BWBaseTest implements Execution | ||
{ | ||
|
||
/** | ||
* | ||
*********************************************************** | ||
* Constructor | ||
*********************************************************** | ||
* | ||
*/ | ||
public AttrImpl_getSpecified() | ||
{ | ||
} | ||
|
||
|
||
/** | ||
* | ||
*********************************************************** | ||
* 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 a = d.createAttribute("dummyattr_1"); | ||
if (a == null) { | ||
TestLoader.logErrPrint("Could not Create Attribute .."); | ||
return BWBaseTest.FAILED; | ||
} else { | ||
if (a.getSpecified()) { | ||
TestLoader.logErrPrint("Attr 'getSpecified' returned true..."); | ||
return BWBaseTest.FAILED; | ||
} else { | ||
} | ||
} | ||
} 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 {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
/** | ||
* | ||
* @version 1.00 | ||
* @author Raju Pallath | ||
* | ||
* TESTID | ||
* | ||
* Tests out the AttrImpl->setValue(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 AttrImpl_setValue_String_0 extends BWBaseTest implements Execution | ||
{ | ||
|
||
/** | ||
* | ||
*********************************************************** | ||
* Constructor | ||
*********************************************************** | ||
* | ||
*/ | ||
public AttrImpl_setValue_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 a = d.createAttribute("dummyattr_3"); | ||
if (a == null) { | ||
TestLoader.logErrPrint("Could not Create Attribute dummyattr_3"); | ||
return BWBaseTest.FAILED; | ||
} else { | ||
a.setValue(null); | ||
String str = a.getValue(); | ||
if (str != null) { | ||
TestLoader.logErrPrint("Attr 'getValue()' is not 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 {} | ||
} | ||
} |
Oops, something went wrong.