You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2001/12/07 02:48:27 UTC
cvs commit: xml-xerces/c/tests/IDom/IDOMTest IDTest.cpp
tng 01/12/06 17:48:27
Modified: c/tests/IDom/IDOMTest IDTest.cpp
Log:
[Bug 1959] setNodeValue throws exception when spec specifies NOP.
Revision Changes Path
1.3 +14 -5 xml-xerces/c/tests/IDom/IDOMTest/IDTest.cpp
Index: IDTest.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/tests/IDom/IDOMTest/IDTest.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- IDTest.cpp 2001/11/23 16:16:52 1.2
+++ IDTest.cpp 2001/12/07 01:48:27 1.3
@@ -56,6 +56,9 @@
/*
* $Log: IDTest.cpp,v $
+ * Revision 1.3 2001/12/07 01:48:27 tng
+ * [Bug 1959] setNodeValue throws exception when spec specifies NOP.
+ *
* Revision 1.2 2001/11/23 16:16:52 tng
* Elimiate compiler warning Warning: String literal converted to char* in initialization.
*
@@ -395,14 +398,20 @@
//"This shouldn't work!"
XMLString::transcode("entityReferenceText information", tempStr, 3999);
+
+ // The following setNodeValue tests are not invalid
+ // According to DOM spec, exception is raised only if the node is readonly, otherwise should be no-op.
+ // EXCEPTIONSTEST(docFirstElement->setNodeValue(tempStr), IDOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, OK, 6);
- EXCEPTIONSTEST(docFirstElement->setNodeValue(tempStr), IDOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, OK, 6);
EXCEPTIONSTEST(docReferenceEntity->setNodeValue(tempStr), IDOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, OK, 7);
+
+ // The following setNodeValue tests are not invalid
+ // According to DOM spec, exception is raised only if the node is readonly, otherwise should be no-op.
// EXCEPTIONSTEST(docEntity->setNodeValue(tempStr), IDOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, OK, 8);
- EXCEPTIONSTEST(doc->setNodeValue(tempStr), IDOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, OK, 9);
- EXCEPTIONSTEST(docDocType->setNodeValue(tempStr), IDOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, OK, 10);
- EXCEPTIONSTEST(docDocFragment->setNodeValue(tempStr), IDOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, OK, 11);
- EXCEPTIONSTEST(docNotation->setNodeValue(tempStr), IDOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, OK, 12);
+ // EXCEPTIONSTEST(doc->setNodeValue(tempStr), IDOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, OK, 9);
+ // EXCEPTIONSTEST(docDocType->setNodeValue(tempStr), IDOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, OK, 10);
+ // EXCEPTIONSTEST(docDocFragment->setNodeValue(tempStr), IDOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, OK, 11);
+ // EXCEPTIONSTEST(docNotation->setNodeValue(tempStr), IDOM_DOMException::NO_MODIFICATION_ALLOWED_ERR, OK, 12);
EXCEPTIONSTEST(docReferenceEntity->appendChild(entityReferenceText2 ), IDOM_DOMException::NO_MODIFICATION_ALLOWED_ERR , OK, 13);
EXCEPTIONSTEST(docBodyLevel32->insertBefore(docTextNode11,docBody ), IDOM_DOMException::NOT_FOUND_ERR, OK, 14);
EXCEPTIONSTEST(docBodyLevel32->removeChild(docFirstElement), IDOM_DOMException::NOT_FOUND_ERR, OK, 15);
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org