pauldick 01/07/11 10:48:56
Modified: c/Tests/Compare compare.cpp
Log:
Moved domCompare methods to FileUtility in the Harness project.
However, current I can't link with it.
Revision Changes Path
1.3 +25 -24 xml-xalan/c/Tests/Compare/compare.cpp
Index: compare.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/Tests/Compare/compare.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- compare.cpp 2001/07/05 21:03:54 1.2
+++ compare.cpp 2001/07/11 17:48:51 1.3
@@ -110,7 +110,7 @@
#if !defined(NDEBUG) && defined(_MSC_VER)
#include <crtdbg.h>
#endif
-
+/*
char *xalanNodeTypes[]=
{"UNKNOWN_NODE",
"ELEMENT_NODE",
@@ -128,7 +128,7 @@
bool
domCompare(const XalanNode& gold ,const XalanNode& doc, XalanDOMString fileName);
-
+*/
void
printArgOptions()
{
@@ -263,8 +263,8 @@
append(baseDir,pathSep);
return fSuccess;
}
-
+/*
void
reportError( XalanDOMString file, XalanDOMString node, char* msg)
{
@@ -301,35 +301,35 @@
if (goldAttrValue != docAttrValue)
{
- reportError(fileName, docAttrName, "Error: Wrong Attribute Value.
Expected: ");
+ reportError(fileName, docAttrName, "Error: Attribute Value mismatch.
Expected: ");
cout << c_str(TranscodeToLocalCodePage(goldAttrValue));
return false;
}
if (goldAttrNsUri != docAttrNsUri)
{
- reportError(fileName, docAttrName, "Error: Wrong Attribute
NamespaceURI. Expected: ");
+ reportError(fileName, docAttrName, "Error: Attribute NamespaceURI
mismatch. Expected: ");
cout << c_str(TranscodeToLocalCodePage(goldAttrNsUri));
return false;
}
-/* I think that these are not necessary. I assume that they will be caught
earlier when
- checking for named attributes.
+// I think that these are not necessary. I assume that they will be caught
earlier when
+// checking for named attributes.
- if (goldAttrPrefix != docAttrPrefix)
- {
- reportError(fileName, "Error: Wrong Attribute Namespace Prefix.
Expected: ",errAttrName);
- cout << c_str(TranscodeToLocalCodePage(goldAttrPrefix));
- return false;
- }
+// if (goldAttrPrefix != docAttrPrefix)
+// {
+// reportError(fileName, "Error: Attribute Namespace Prefix mismatch.
Expected: ",errAttrName);
+// cout << c_str(TranscodeToLocalCodePage(goldAttrPrefix));
+// return false;
+// }
+
+// if (goldAttrLName != docAttrLName)
+// {
+// reportError(fileName, "Error: Attribute LocalName mismatch. Expected:
",errAttrName);
+// cout << c_str(TranscodeToLocalCodePage(goldAttrLName));
+// return false;
+// }
- if (goldAttrLName != docAttrLName)
- {
- reportError(fileName, "Error: Wrong Attribute LocalName. Expected:
",errAttrName);
- cout << c_str(TranscodeToLocalCodePage(goldAttrLName));
- return false;
- }
-*/
return true;
}
@@ -567,7 +567,8 @@
return true;
}
-
+
+*/
FormatterListener*
getXMLFormatter(bool shouldWriteXMLHeader,
bool stripCData,
@@ -685,7 +686,6 @@
for(FileNameVectorType::size_type i = 0; i <
files.size(); i++)
{
-
Hashtable attrs;
attrs.insert(Hashtable::value_type(XalanDOMString("idref"), files[i]));
@@ -699,6 +699,7 @@
const XalanDOMString outbase = outputRoot +
xDir + pathSep + files[i];
const XalanDOMString theOutputFile =
futil.GenerateFileName(outbase, "out");
+ cout << endl << endl << "Processing: " <<
files[i] << endl;
const XSLTInputSource
xslInputSource(c_wstr(theXSLFile));
const XSLTInputSource
xmlInputSource(c_wstr(theXMLFile));
@@ -751,9 +752,9 @@
XalanDocument* goldDom =
parserLiaison.parseXMLStream(goldInputSource);
- if (domCompare(*goldDom, *dom,
files[i]))
+ if ( futil.domCompare(*goldDom, *dom,
files[i]) )
{
- cout << "Passed: " <<
c_str(TranscodeToLocalCodePage(files[i]));
+ cout << endl << "Passed: " <<
c_str(TranscodeToLocalCodePage(files[i]));
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]