Removing unused (and bitrotted) tests.
Not part of the build. r=peterv, no bug git-svn-id: svn://10.0.0.236/trunk@98374 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1,68 +0,0 @@
|
||||
target: TestMozDOM
|
||||
|
||||
TestMozDOM: MozillaDOMImplementation.o MozillaNotation.o MozillaDocumentFragment.o MozillaDocumentType.o MozillaProcInstruction.o MozillaEntity.o MozillaEntityReference.o MozillaCDATASection.o MozillaComment.o MozillaText.o MozillaCharacterData.o MozillaNamedNodeMap.o MozillaNodeList.o MozillaElement.o MozillaAttr.o MozillaDocument.o MozillaNode.o testMozDOM.o
|
||||
g++ -Xlinker ../../../../../../xpcom/build/libxpcom.so ../../../../../../layout/build/libraptorhtml.so ../../../base/String.o ../../../base/TxObjectWrapper.o ../../../base/MozillaString.o ../../../base/HashTable.o MozillaNode.o MozillaDocument.o MozillaElement.o MozillaAttr.o MozillaNodeList.o MozillaNamedNodeMap.o MozillaCharacterData.o MozillaText.o MozillaComment.o MozillaCDATASection.o MozillaEntityReference.o MozillaEntity.o MozillaProcInstruction.o MozillaDocumentType.o MozillaDocumentFragment.o MozillaDOMImplementation.o MozillaNotation.o testMozDOM.o -o testdom
|
||||
|
||||
testMozDOM.o: testMozDOM.cpp mozilladom.h
|
||||
g++ -c -fno-rtti -fno-exceptions -I../../../../../../dist/include -I../../../../../../layout/xml/document/src -I../../../../../../layout/html/document/src -I../../../../../../layout/base/src -I../../../base testMozDOM.cpp
|
||||
|
||||
MozillaDOMImplementation.o: MozillaDOMImplementation.cpp mozilladom.h
|
||||
g++ -c -fno-rtti -fno-exceptions -I../../../../../../dist/include -I../../../base MozillaDOMImplementation.cpp
|
||||
|
||||
MozillaDocumentFragment.o: MozillaDocumentFragment.cpp mozilladom.h
|
||||
g++ -c -fno-rtti -fno-exceptions -I../../../../../../dist/include -I../../../base MozillaDocumentFragment.cpp
|
||||
|
||||
MozillaNotation.o: MozillaNotation.cpp mozilladom.h
|
||||
g++ -c -fno-rtti -fno-exceptions -I../../../../../../dist/include -I../../../base MozillaNotation.cpp
|
||||
|
||||
MozillaDocumentType.o: MozillaDocumentType.cpp mozilladom.h
|
||||
g++ -c -fno-rtti -fno-exceptions -I../../../../../../dist/include -I../../../base MozillaDocumentType.cpp
|
||||
|
||||
MozillaProcInstruction.o: MozillaProcInstruction.cpp mozilladom.h
|
||||
g++ -c -fno-rtti -fno-exceptions -I../../../../../../dist/include -I../../../base MozillaProcInstruction.cpp
|
||||
|
||||
MozillaEntity.o : MozillaEntity.cpp mozilladom.h
|
||||
g++ -c -fno-rtti -fno-exceptions -I../../../../../../dist/include -I../../../base MozillaEntity.cpp
|
||||
|
||||
MozillaEntityReference.o: MozillaEntityReference.cpp mozilladom.h
|
||||
g++ -c -fno-rtti -fno-exceptions -I../../../../../../dist/include -I../../../base MozillaEntityReference.cpp
|
||||
|
||||
MozillaCDATASection.o: MozillaCDATASection.cpp mozilladom.h
|
||||
g++ -c -fno-rtti -fno-exceptions -I../../../../../../dist/include -I../../../base MozillaCDATASection.cpp
|
||||
|
||||
MozillaComment.o: MozillaComment.cpp mozilladom.h
|
||||
g++ -c -fno-rtti -fno-exceptions -I../../../../../../dist/include -I../../../base MozillaComment.cpp
|
||||
|
||||
MozillaText.o: MozillaText.cpp mozilladom.h
|
||||
g++ -c -fno-rtti -fno-exceptions -I../../../../../../dist/include -I../../../base MozillaText.cpp
|
||||
|
||||
MozillaCharacterData.o: MozillaCharacterData.cpp mozilladom.h
|
||||
g++ -c -fno-rtti -fno-exceptions -I../../../../../../dist/include -I../../../base MozillaCharacterData.cpp
|
||||
|
||||
MozillaNamedNodeMap.o: MozillaNamedNodeMap.cpp mozilladom.h
|
||||
g++ -c -fno-rtti -fno-exceptions -I../../../../../../dist/include -I../../../base MozillaNamedNodeMap.cpp
|
||||
|
||||
MozillaNodeList.o: MozillaNodeList.cpp mozilladom.h
|
||||
g++ -c -fno-rtti -fno-exceptions -I../../../../../../dist/include -I../../../base MozillaNodeList.cpp
|
||||
|
||||
MozillaElement.o: MozillaElement.cpp mozilladom.h
|
||||
g++ -c -fno-rtti -fno-exceptions -I../../../../../../dist/include -I../../../base MozillaElement.cpp
|
||||
|
||||
MozillaDocument.o: MozillaDocument.cpp mozilladom.h
|
||||
g++ -c -fno-rtti -fno-exceptions -I../../../../../../dist/include -I../../../base MozillaDocument.cpp
|
||||
|
||||
MozillaNode.o: MozillaNode.cpp mozilladom.h
|
||||
g++ -c -fno-rtti -fno-exceptions -I../../../../../../dist/include -I../../../base MozillaNode.cpp
|
||||
|
||||
MozillaAttr.o: MozillaAttr.cpp mozilladom.h
|
||||
g++ -c -fno-rtti -fno-exceptions -I../../../../../../dist/include -I../../../base MozillaAttr.cpp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
//Simple test program for the Mozilla DOM wrapper classes
|
||||
|
||||
#include "mozilladom.h"
|
||||
#include "nsXMLDocument.h"
|
||||
#include "iostream.h"
|
||||
|
||||
void main()
|
||||
{
|
||||
nsXMLDocument* DocTestElem = new nsXMLDocument();
|
||||
|
||||
nsIDOMElement* nsDocElem = NULL;
|
||||
nsIDOMElement* returnElem = NULL;
|
||||
|
||||
MozillaString tag, tag2;
|
||||
|
||||
nsresult res;
|
||||
|
||||
DocTestElem->CreateElement("Document-Element", &nsDocElem);
|
||||
|
||||
if (DocTestElem->AppendChild(nsDocElem, &((nsIDOMNode*)returnElem)) != NS_OK)
|
||||
cout << "The AppendChild did not work" << endl;
|
||||
else
|
||||
{
|
||||
cout << "Element Inserted" << endl;
|
||||
returnElem->GetTagName(tag.getNSString());
|
||||
cout << tag << endl;
|
||||
}
|
||||
|
||||
res=DocTestElem->GetDocumentElement(&returnElem);
|
||||
if (res == NS_OK)
|
||||
{
|
||||
cout << "Document's Element = ";
|
||||
returnElem->GetTagName(tag2.getNSString());
|
||||
cout << tag << endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
cout << "ERROR! Could not retrieve the document's element (" << hex << res << ")" << endl << endl;;
|
||||
}
|
||||
|
||||
delete DocTestElem;
|
||||
|
||||
|
||||
//nsXMLDocument* nsxmlDocument = new nsXMLDocument();
|
||||
//Document* document = new Document(nsxmlDocument);
|
||||
Document* document = new Document();
|
||||
Element* elem1;
|
||||
Element* subelem1;
|
||||
Element* subelem2;
|
||||
Attr* attr2;
|
||||
Attr* tmpAttr;
|
||||
NodeList* subElems = NULL;
|
||||
Element* tmpElem = NULL;
|
||||
NamedNodeMap* attrs = NULL;
|
||||
Node* tmpNode;
|
||||
|
||||
cout << "--- Before Element Create ---" << endl;
|
||||
|
||||
elem1 = document->createElement("FirstElement");
|
||||
|
||||
cout << "elem1 tag name=" << elem1->getTagName() << endl;
|
||||
|
||||
elem1->setAttribute("Attr1", "Attr1Value");
|
||||
cout << "elem1 attr1=" << elem1->getAttribute("Attr1") << endl;
|
||||
|
||||
attr2 = document->createAttribute("Attr2");
|
||||
attr2->setValue("attr2 value");
|
||||
cout << "attr2 name=" << attr2->getName() << endl;
|
||||
cout << "attr2 value=" << attr2->getValue() << endl;
|
||||
|
||||
elem1->setAttributeNode(attr2);
|
||||
cout << "elem1 attr2=" << elem1->getAttribute("Attr2") << endl;
|
||||
|
||||
tmpAttr = elem1->getAttributeNode("Attr2");
|
||||
cout << "tmpAttr name=" << tmpAttr->getName() << endl;
|
||||
cout << "tmpAttr value=" << tmpAttr->getValue() << endl;
|
||||
|
||||
//tmpAttr = elem1->getAttributeNode("Attr1");
|
||||
//elem1->removeAttributeNode(tmpAttr);
|
||||
//cout << "elem1 attr1 (after removal)=" << elem1->getAttribute("Attr1") << endl;
|
||||
|
||||
//elem1->removeAttribute("Attr2");
|
||||
//cout << "elem1 attr2 (after removal)=" << elem1->getAttribute("Attr2") << endl;
|
||||
|
||||
//tmpAttr = elem1->getAttributeNode("Attr2");
|
||||
//cout << "tmpAttr name (after removal)=" << tmpAttr->getName() << endl;
|
||||
//cout << "tmpAttr value (after removal)=" << tmpAttr->getValue() << endl;
|
||||
|
||||
cout << endl << "--- Check out the Node List Stuff ---" << endl;
|
||||
|
||||
subelem1 = document->createElement("Sub Elem0");
|
||||
subelem2 = document->createElement("Sub Elem1");
|
||||
|
||||
elem1->appendChild(subelem1);
|
||||
elem1->appendChild(subelem2);
|
||||
|
||||
subElems = elem1->getChildNodes();
|
||||
|
||||
cout << "subElems length=" << subElems->getLength() << endl;
|
||||
|
||||
tmpElem = (Element*)subElems->item(0);
|
||||
|
||||
cout << "tmpElem name=" << tmpElem->getTagName() << endl;
|
||||
|
||||
cout << endl << "--- Check out the Named Node Map Stuff ---" << endl;
|
||||
|
||||
attrs = elem1->getAttributes();
|
||||
|
||||
cout << "attrs length=" << attrs->getLength() << endl;
|
||||
|
||||
tmpAttr = (Attr*)attrs->item(1);
|
||||
|
||||
cout << tmpAttr->getName() << "=" << tmpAttr->getValue() << endl;
|
||||
|
||||
//delete nsxmlDocument;
|
||||
delete document;
|
||||
}
|
||||
@@ -1,192 +0,0 @@
|
||||
/*
|
||||
* 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 TransforMiiX XSLT processor.
|
||||
*
|
||||
* The Initial Developer of the Original Code is The MITRE Corporation.
|
||||
* Portions created by MITRE are Copyright (C) 1999 The MITRE Corporation.
|
||||
*
|
||||
* Portions created by Keith Visco as a Non MITRE employee,
|
||||
* (C) 1999 Keith Visco. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Keith Visco, kvisco@ziplink.net
|
||||
* -- original author.
|
||||
*
|
||||
* $Id: Parser.cpp,v 1.5 2001-01-22 09:36:19 kvisco%ziplink.net Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
* Test App for Expressions
|
||||
* @version $Revision: 1.5 $ $Date: 2001-01-22 09:36:19 $
|
||||
**/
|
||||
|
||||
#include <iostream.h>
|
||||
#include "TxString.h"
|
||||
#include "Expr.h"
|
||||
#include "ExprLexer.h"
|
||||
#include "ExprParser.h"
|
||||
#include "NamedMap.h"
|
||||
#include "ExprResult.h"
|
||||
|
||||
void main(int argc, char** argv) {
|
||||
|
||||
|
||||
cout <<endl;
|
||||
|
||||
//-- old test cases, commented for re-use
|
||||
//String pattern("element[position()=1]");
|
||||
//String pattern("*[text()='foo']");
|
||||
//String pattern("@*|node()");
|
||||
//String pattern("FSContext/UserList/User[@id=/FSContext/SessionData/@userref]/@priv = 'admin'");
|
||||
|
||||
//String pattern("10/3");
|
||||
//String pattern("*[1]foo|*[1]/bar|*[1]/baz");
|
||||
|
||||
//-- Current Test
|
||||
String pattern("*[test()='foo']");
|
||||
|
||||
cout <<"Lexically Analyzing: "<<pattern<<endl;
|
||||
cout<<endl;
|
||||
|
||||
ExprLexer lexer(pattern);
|
||||
|
||||
Token* token = 0;
|
||||
|
||||
|
||||
int tokenCount = lexer.countAllTokens();
|
||||
|
||||
for (int i = 0; i < tokenCount; i++) {
|
||||
token = lexer.nextToken();
|
||||
cout <<"Token: ";
|
||||
if (token) {
|
||||
cout << token->value;
|
||||
|
||||
//-- do padding
|
||||
for ( int i = token->value.length(); i < 20; i++) cout<<" ";
|
||||
|
||||
//-- print token type
|
||||
switch (token->type) {
|
||||
case Token::AT_SIGN:
|
||||
cout << "#AT_SIGN";
|
||||
break;
|
||||
case Token::PARENT_OP :
|
||||
cout<<"#PARENT_OP";
|
||||
break;
|
||||
case Token::ANCESTOR_OP :
|
||||
cout<<"#ANCESTOR_OP";
|
||||
break;
|
||||
case Token::L_PAREN :
|
||||
cout<<"#L_PAREN";
|
||||
break;
|
||||
case Token::R_PAREN :
|
||||
cout<<"#R_PAREN";
|
||||
break;
|
||||
case Token::L_BRACKET:
|
||||
cout<<"#L_BRACKET";
|
||||
break;
|
||||
case Token::R_BRACKET:
|
||||
cout<<"#R_BRACKET";
|
||||
break;
|
||||
case Token::COMMA:
|
||||
cout<<"#COMMA";
|
||||
break;
|
||||
case Token::LITERAL:
|
||||
cout<<"#LITERAL";
|
||||
break;
|
||||
case Token::CNAME:
|
||||
cout<<"#CNAME";
|
||||
break;
|
||||
case Token::COMMENT:
|
||||
cout<<"#COMMENT";
|
||||
break;
|
||||
case Token::NODE:
|
||||
cout<<"#NODE";
|
||||
break;
|
||||
case Token::PI:
|
||||
cout<<"#PI";
|
||||
break;
|
||||
case Token::TEXT:
|
||||
cout<<"#TEXT";
|
||||
break;
|
||||
case Token::FUNCTION_NAME:
|
||||
cout<<"#FUNCTION_NAME";
|
||||
break;
|
||||
case Token::NUMBER:
|
||||
cout << "#NUMBER";
|
||||
break;
|
||||
case Token::PARENT_NODE :
|
||||
cout << "#PARENT_NODE";
|
||||
break;
|
||||
case Token::SELF_NODE :
|
||||
cout << "#SELF_NODE";
|
||||
break;
|
||||
case Token::VAR_REFERENCE:
|
||||
cout << "#VAR_REFERENCE";
|
||||
case Token::AXIS_IDENTIFIER:
|
||||
cout << "#AXIS_IDENTIFIER";
|
||||
break;
|
||||
default:
|
||||
if ( lexer.isOperatorToken(token) ) {
|
||||
cout << "#operator";
|
||||
}
|
||||
else cout<<"#unknown";
|
||||
break;
|
||||
}
|
||||
}
|
||||
else cout<<"NULL";
|
||||
cout<<endl;
|
||||
}
|
||||
|
||||
|
||||
cout <<endl;
|
||||
|
||||
cout <<"Creating Expr: "<<pattern<<endl;
|
||||
cout<<endl;
|
||||
|
||||
ExprParser parser;
|
||||
|
||||
//Expr* expr = (Expr*)parser.createExpr(pattern);
|
||||
Expr* expr = (Expr*)parser.createPatternExpr(pattern);
|
||||
|
||||
cout << "Checking result"<<endl;
|
||||
|
||||
String resultString;
|
||||
|
||||
if ( !expr ) {
|
||||
cout << "#error, "<<pattern<< " is not valid."<<endl;
|
||||
}
|
||||
else {
|
||||
expr->toString(resultString);
|
||||
cout << "result: "<<resultString <<endl;
|
||||
}
|
||||
|
||||
cout << endl << "----------------------" << endl << endl;
|
||||
|
||||
NumberExpr numberExpr( -24.0 );
|
||||
resultString.clear();
|
||||
numberExpr.toString(resultString);
|
||||
cout << "NumberExpr: " << resultString << endl << endl;
|
||||
StringResult strResult("-24");
|
||||
cout << "StringResult: " << strResult.numberValue() << endl;
|
||||
|
||||
//-- AttributeValueTemplate test
|
||||
cout << endl << "----------------------" << endl << endl;
|
||||
String avt("this is a {text()} of {{{{attr value templates}}}}");
|
||||
expr = parser.createAttributeValueTemplate(avt);
|
||||
resultString.clear();
|
||||
expr->toString(resultString);
|
||||
cout << "result of avt: "<<resultString <<endl;
|
||||
//-- clean up
|
||||
delete expr;
|
||||
|
||||
} //-- main
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
|
||||
CC := g++ -g
|
||||
|
||||
ROOT_PATH = ..
|
||||
BASE_PATH = $(ROOT_PATH)/base
|
||||
XML_PATH = $(ROOT_PATH)/xml
|
||||
DOM_PATH = $(XML_PATH)/dom/standalone
|
||||
XSLT_PATH = $(ROOT_PATH)/xslt
|
||||
|
||||
INCLUDE_PATHS = -I. \
|
||||
-I$(BASE_PATH) \
|
||||
-I$(DOM_PATH) \
|
||||
-I$(XML_PATH) \
|
||||
-I$(XSLT_PATH) \
|
||||
-I-
|
||||
|
||||
OBJS = *.o \
|
||||
$(BASE_PATH)/*.o \
|
||||
$(DOM_PATH)/*.o \
|
||||
$(XML_PATH)/*.o \
|
||||
$(XSLT_PATH)/Names.o
|
||||
|
||||
|
||||
|
||||
|
||||
target:
|
||||
$(CC) $(INCLUDE_PATHS) $(OBJS) Parser.cpp -o parser
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user