curcuru 01/11/02 16:35:48
Modified: test/java/src/org/apache/qetest/trax URIResolverTest.java
test/java/src/org/apache/qetest/trax/stream
StreamResultAPITest.java
test/java/src/org/apache/qetest/xalanj2
SmoketestOuttakes.java
Log:
Move Bugzilla-reported fail #2425 from URIResolverTest to SmoketestOuttakes
Revision Changes Path
1.5 +7 -3
xml-xalan/test/java/src/org/apache/qetest/trax/URIResolverTest.java
Index: URIResolverTest.java
===================================================================
RCS file:
/home/cvs/xml-xalan/test/java/src/org/apache/qetest/trax/URIResolverTest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- URIResolverTest.java 2001/10/09 14:22:45 1.4
+++ URIResolverTest.java 2001/11/03 00:35:48 1.5
@@ -90,7 +90,7 @@
/**
* Verify that URIResolvers are called properly.
* @author [EMAIL PROTECTED]
- * @version $Id: URIResolverTest.java,v 1.4 2001/10/09 14:22:45 curcuru Exp $
+ * @version $Id: URIResolverTest.java,v 1.5 2001/11/03 00:35:48 curcuru Exp $
*/
public class URIResolverTest extends XSLProcessorTestBase
{
@@ -201,14 +201,18 @@
// Validate various URI's to be resolved during transform
// time with the loggingURIResolver
- reporter.logWarningMsg("Bugzilla#2425 every document() call is
resolved twice twice - two fails caused below");
String[] expectedXmlUris =
{
"{" + QetestUtils.filenameToURL(testFileInfo.inputName) +
"}" + "../impincl/SystemIdImport.xsl",
"{" + QetestUtils.filenameToURL(testFileInfo.inputName) +
"}" + "impincl/SystemIdImport.xsl",
"{" + QetestUtils.filenameToURL(testFileInfo.inputName) +
"}" + "systemid/impincl/SystemIdImport.xsl",
};
- loggingURIResolver.setExpected(expectedXmlUris);
+
+ //@todo Bugzilla#2425 every document() call is resolved twice
twice - two fails caused below MOVED to SmoketestOuttakes.java 02-Nov-01 -sc
+ reporter.logWarningMsg("Bugzilla#2425 every document() call is
resolved twice twice - two fails caused below MOVED to SmoketestOuttakes.java
02-Nov-01 -sc");
+ // loggingURIResolver.setExpected(expectedXmlUris);
+ //@todo Bugzilla#2425 every document() call is resolved twice
twice - two fails caused below MOVED to SmoketestOuttakes.java 02-Nov-01 -sc
+
reporter.logTraceMsg("about to transform(...)");
transformer.transform(new
StreamSource(QetestUtils.filenameToURL(testFileInfo.xmlName)),
new StreamResult(outNames.nextName()));
1.4 +4 -1
xml-xalan/test/java/src/org/apache/qetest/trax/stream/StreamResultAPITest.java
Index: StreamResultAPITest.java
===================================================================
RCS file:
/home/cvs/xml-xalan/test/java/src/org/apache/qetest/trax/stream/StreamResultAPITest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- StreamResultAPITest.java 2000/12/06 13:43:26 1.3
+++ StreamResultAPITest.java 2001/11/03 00:35:48 1.4
@@ -96,7 +96,7 @@
/**
* API Coverage test for the StreamResult class of TRAX..
* @author [EMAIL PROTECTED]
- * @version $Id: StreamResultAPITest.java,v 1.3 2000/12/06 13:43:26 curcuru
Exp $
+ * @version $Id: StreamResultAPITest.java,v 1.4 2001/11/03 00:35:48 curcuru
Exp $
*/
public class StreamResultAPITest extends XSLProcessorTestBase
{
@@ -390,6 +390,9 @@
FileWriter fw = new FileWriter(outNames.nextName());
fw.write(data);
fw.close();
+ // Explicitly ask that Validation be turned off, since
+ // we use bogus systemids
+ fileChecker.setAttribute(XHTFileCheckService.SETVALIDATING,
"false");
fileChecker.check(reporter,
new File(outNames.currentName()),
new File(goldFile),
1.4 +61 -2
xml-xalan/test/java/src/org/apache/qetest/xalanj2/SmoketestOuttakes.java
Index: SmoketestOuttakes.java
===================================================================
RCS file:
/home/cvs/xml-xalan/test/java/src/org/apache/qetest/xalanj2/SmoketestOuttakes.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SmoketestOuttakes.java 2001/10/25 21:06:12 1.3
+++ SmoketestOuttakes.java 2001/11/03 00:35:48 1.4
@@ -118,7 +118,7 @@
* due to recent changes you have made).
*
* @author [EMAIL PROTECTED]
- * @version $Id: SmoketestOuttakes.java,v 1.3 2001/10/25 21:06:12 curcuru
Exp $
+ * @version $Id: SmoketestOuttakes.java,v 1.4 2001/11/03 00:35:48 curcuru
Exp $
*/
public class SmoketestOuttakes extends XSLProcessorTestBase
{
@@ -130,7 +130,7 @@
/** Just initialize test name, comment, numTestCases. */
public SmoketestOuttakes()
{
- numTestCases = 4; // REPLACE_num
+ numTestCases = 5; // REPLACE_num
testName = "SmoketestOuttakes";
testComment = "Individual test points taken out of other automation
files";
}
@@ -600,6 +600,65 @@
{
reporter.checkFail("errorListener-DOM unexpectedly threw: " +
t.toString());
reporter.logThrowable(Logger.ERRORMSG, t, "errorListener-DOM
unexpectedly threw");
+ }
+
+ reporter.testCaseClose();
+ return true;
+ }
+
+
+ /**
+ * From URIResolverTest.java testCase1
+ * Build a stylesheet/do a transform with lots of URIs to resolve.
+ * Verify that the URIResolver is called properly.
+ * @return false if we should abort the test; true otherwise
+ */
+ public boolean testCase5()
+ {
+ reporter.testCaseInit("Build a stylesheet/do a transform with lots
of URIs to resolve");
+
+ XSLTestfileInfo testFileInfo = new XSLTestfileInfo();
+ testFileInfo.inputName = inputDir + File.separator + "trax" +
File.separator + "URIResolverTest.xsl";
+ testFileInfo.xmlName = inputDir + File.separator + "trax" +
File.separator + "URIResolverTest.xml";
+ testFileInfo.goldName = goldDir + File.separator + "trax" +
File.separator + "URIResolverTest.out";
+
+ TransformerFactory factory = null;
+ Templates templates = null;
+ Transformer transformer = null;
+ try
+ {
+ factory = TransformerFactory.newInstance();
+ // Set the URIResolver and validate it
+ reporter.logInfoMsg("About to factory.newTemplates(" +
QetestUtils.filenameToURL(testFileInfo.inputName) + ")");
+ templates = factory.newTemplates(new
StreamSource(QetestUtils.filenameToURL(testFileInfo.inputName)));
+ transformer = templates.newTransformer();
+
+ // Set the URIResolver and validate it
+ LoggingURIResolver loggingURIResolver = new
LoggingURIResolver((Logger)reporter);
+ reporter.logTraceMsg("loggingURIResolver originally setup:" +
loggingURIResolver.getQuickCounters());
+ transformer.setURIResolver(loggingURIResolver);
+ reporter.check((transformer.getURIResolver() ==
loggingURIResolver),
+ true, "set/getURIResolver on transformer");
+
+ // Validate various URI's to be resolved during transform
+ // time with the loggingURIResolver
+ reporter.logWarningMsg("Bugzilla#2425 every document() call is
resolved twice twice - two fails caused below");
+ String[] expectedXmlUris =
+ {
+ "{" + QetestUtils.filenameToURL(testFileInfo.inputName) +
"}" + "../impincl/SystemIdImport.xsl",
+ "{" + QetestUtils.filenameToURL(testFileInfo.inputName) +
"}" + "impincl/SystemIdImport.xsl",
+ "{" + QetestUtils.filenameToURL(testFileInfo.inputName) +
"}" + "systemid/impincl/SystemIdImport.xsl",
+ };
+ loggingURIResolver.setExpected(expectedXmlUris);
+ reporter.logTraceMsg("about to transform(...)");
+ transformer.transform(new
StreamSource(QetestUtils.filenameToURL(testFileInfo.xmlName)),
+ new StreamResult(outNames.nextName()));
+ reporter.logTraceMsg("after transform(...)");
+ }
+ catch (Throwable t)
+ {
+ reporter.checkFail("URIResolver test unexpectedly threw: " +
t.toString());
+ reporter.logThrowable(Logger.ERRORMSG, t, "URIResolver test
unexpectedly threw");
}
reporter.testCaseClose();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]