From 72017803f1ac13df3242d17e84991950cd8f5f2c Mon Sep 17 00:00:00 2001 From: "rpallath%eng.sun.com" Date: Tue, 4 Apr 2000 22:18:53 +0000 Subject: [PATCH] Added new unsupported methods --- ...ntImpl_hasAttributeNS_String_String_0.java | 129 +++++++++++++++++ ...ntImpl_hasAttributeNS_String_String_1.java | 129 +++++++++++++++++ ...ntImpl_hasAttributeNS_String_String_2.java | 129 +++++++++++++++++ ...ntImpl_hasAttributeNS_String_String_3.java | 129 +++++++++++++++++ .../ElementImpl_hasAttribute_String_0.java | 130 ++++++++++++++++++ .../ElementImpl_hasAttribute_String_1.java | 129 +++++++++++++++++ 6 files changed, 775 insertions(+) create mode 100755 java/dom/tests/src/api/ElementImpl_hasAttributeNS_String_String_0.java create mode 100755 java/dom/tests/src/api/ElementImpl_hasAttributeNS_String_String_1.java create mode 100755 java/dom/tests/src/api/ElementImpl_hasAttributeNS_String_String_2.java create mode 100755 java/dom/tests/src/api/ElementImpl_hasAttributeNS_String_String_3.java create mode 100755 java/dom/tests/src/api/ElementImpl_hasAttribute_String_0.java create mode 100755 java/dom/tests/src/api/ElementImpl_hasAttribute_String_1.java diff --git a/java/dom/tests/src/api/ElementImpl_hasAttributeNS_String_String_0.java b/java/dom/tests/src/api/ElementImpl_hasAttributeNS_String_String_0.java new file mode 100755 index 000000000000..107bf1e97b8f --- /dev/null +++ b/java/dom/tests/src/api/ElementImpl_hasAttributeNS_String_String_0.java @@ -0,0 +1,129 @@ +/* + The contents of this file are subject to the Mozilla Public + License Version 1.1 (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 Original Code is mozilla.org code. + + 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. + + Contributor(s): +*/ + +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_hasAttributeNS_String_String_0 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_hasAttributeNS_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) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + try { + if (e.hasAttributeNS(null, null)) ; + TestLoader.logErrPrint("Element 'hasAttributeNS is not a supported method. Should not return any value... "); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTED METHOD"); + return BWBaseTest.PASSED; + } + } + } catch (RuntimeException r) { + String msg = "Caught RuntimeException " + r ; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + } + } else { + System.out.println("Document is NULL.."); + return BWBaseTest.FAILED; + } + + } + + + /** + * + *********************************************************** + * 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 {} + } +} diff --git a/java/dom/tests/src/api/ElementImpl_hasAttributeNS_String_String_1.java b/java/dom/tests/src/api/ElementImpl_hasAttributeNS_String_String_1.java new file mode 100755 index 000000000000..987b77f9c6bb --- /dev/null +++ b/java/dom/tests/src/api/ElementImpl_hasAttributeNS_String_String_1.java @@ -0,0 +1,129 @@ +/* + The contents of this file are subject to the Mozilla Public + License Version 1.1 (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 Original Code is mozilla.org code. + + 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. + + Contributor(s): +*/ + +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_hasAttributeNS_String_String_1 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_hasAttributeNS_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) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + try { + if (e.hasAttributeNS("dummy", null)); + TestLoader.logErrPrint("Element 'hasAttributeNS is not a supported method. Should not return any value... "); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTED METHOD"); + return BWBaseTest.PASSED; + } + } + } catch (RuntimeException r) { + String msg = "Caught RuntimeException " + r ; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + } + } else { + System.out.println("Document is NULL.."); + return BWBaseTest.FAILED; + } + + } + + + /** + * + *********************************************************** + * 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 {} + } +} diff --git a/java/dom/tests/src/api/ElementImpl_hasAttributeNS_String_String_2.java b/java/dom/tests/src/api/ElementImpl_hasAttributeNS_String_String_2.java new file mode 100755 index 000000000000..8b5e636ff4bc --- /dev/null +++ b/java/dom/tests/src/api/ElementImpl_hasAttributeNS_String_String_2.java @@ -0,0 +1,129 @@ +/* + The contents of this file are subject to the Mozilla Public + License Version 1.1 (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 Original Code is mozilla.org code. + + 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. + + Contributor(s): +*/ + +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_hasAttributeNS_String_String_2 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_hasAttributeNS_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) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + try { + if (e.hasAttributeNS(null, "dummy")); + TestLoader.logErrPrint("Element 'hasAttributeNS is not a supported method. Should not return any value... "); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTED METHOD"); + return BWBaseTest.PASSED; + } + } + } catch (RuntimeException r) { + String msg = "Caught RuntimeException " + r ; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + } + } else { + System.out.println("Document is NULL.."); + return BWBaseTest.FAILED; + } + + } + + + /** + * + *********************************************************** + * 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 {} + } +} diff --git a/java/dom/tests/src/api/ElementImpl_hasAttributeNS_String_String_3.java b/java/dom/tests/src/api/ElementImpl_hasAttributeNS_String_String_3.java new file mode 100755 index 000000000000..1c01afe9958e --- /dev/null +++ b/java/dom/tests/src/api/ElementImpl_hasAttributeNS_String_String_3.java @@ -0,0 +1,129 @@ +/* + The contents of this file are subject to the Mozilla Public + License Version 1.1 (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 Original Code is mozilla.org code. + + 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. + + Contributor(s): +*/ + +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_hasAttributeNS_String_String_3 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_hasAttributeNS_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) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + try { + if (e.hasAttributeNS("dummy", "dummy")); + TestLoader.logErrPrint("Element 'hasAttributeNS is not a supported method. Should not return any value... "); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTED METHOD"); + return BWBaseTest.PASSED; + } + } + } catch (RuntimeException r) { + String msg = "Caught RuntimeException " + r ; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + } + } else { + System.out.println("Document is NULL.."); + return BWBaseTest.FAILED; + } + + } + + + /** + * + *********************************************************** + * 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 {} + } +} diff --git a/java/dom/tests/src/api/ElementImpl_hasAttribute_String_0.java b/java/dom/tests/src/api/ElementImpl_hasAttribute_String_0.java new file mode 100755 index 000000000000..bb539704a38c --- /dev/null +++ b/java/dom/tests/src/api/ElementImpl_hasAttribute_String_0.java @@ -0,0 +1,130 @@ +/* + The contents of this file are subject to the Mozilla Public + License Version 1.1 (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 Original Code is mozilla.org code. + + 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. + + Contributor(s): +*/ + +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_hasAttribute_String_0 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_hasAttribute_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) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + try { + if (e.hasAttribute(null)); + TestLoader.logErrPrint("Element 'hasAttribute(null) is not a supported method. Should not return any value... "); + return BWBaseTest.FAILED; + + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTED METHOD"); + return BWBaseTest.PASSED; + } + } + } catch (RuntimeException r) { + String msg = "Caught RuntimeException " + r ; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + } + } else { + System.out.println("Document is NULL.."); + return BWBaseTest.FAILED; + } + + } + + + /** + * + *********************************************************** + * 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 {} + } +} diff --git a/java/dom/tests/src/api/ElementImpl_hasAttribute_String_1.java b/java/dom/tests/src/api/ElementImpl_hasAttribute_String_1.java new file mode 100755 index 000000000000..7da3111c6857 --- /dev/null +++ b/java/dom/tests/src/api/ElementImpl_hasAttribute_String_1.java @@ -0,0 +1,129 @@ +/* + The contents of this file are subject to the Mozilla Public + License Version 1.1 (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 Original Code is mozilla.org code. + + 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. + + Contributor(s): +*/ + +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_hasAttribute_String_1 extends BWBaseTest implements Execution +{ + + /** + * + *********************************************************** + * Constructor + *********************************************************** + * + */ + public ElementImpl_hasAttribute_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) + { + try { + Element e = d.getDocumentElement(); + if (e == null) { + TestLoader.logErrPrint("Document Element is NULL.."); + return BWBaseTest.FAILED; + } else { + try { + if (e.hasAttribute("name")); + TestLoader.logErrPrint("Element 'hasAttribute(null) is not a supported method. Should not return any value... "); + return BWBaseTest.FAILED; + } catch (UnsupportedOperationException ue) { + TestLoader.logErrPrint("UNSUPPORTED METHOD"); + return BWBaseTest.PASSED; + } + } + } catch (RuntimeException r) { + String msg = "Caught RuntimeException " + r ; + TestLoader.logErrPrint(msg); + return BWBaseTest.PASSED; + } + } else { + System.out.println("Document is NULL.."); + return BWBaseTest.FAILED; + } + + } + + + /** + * + *********************************************************** + * 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 {} + } +}