Return-Path: Delivered-To: apmail-xml-xalan-cvs-archive@www.apache.org Received: (qmail 23538 invoked from network); 18 Sep 2008 06:10:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Sep 2008 06:10:15 -0000 Received: (qmail 93586 invoked by uid 500); 18 Sep 2008 06:10:12 -0000 Delivered-To: apmail-xml-xalan-cvs-archive@xml.apache.org Received: (qmail 93569 invoked by uid 500); 18 Sep 2008 06:10:12 -0000 Mailing-List: contact xalan-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: List-Id: Delivered-To: mailing list xalan-cvs@xml.apache.org Received: (qmail 93560 invoked by uid 99); 18 Sep 2008 06:10:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Sep 2008 23:10:12 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Sep 2008 06:09:21 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 52D86238896B; Wed, 17 Sep 2008 23:09:54 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r696567 - in /xalan/c/trunk: Tests/Conf/conf.cpp src/xalanc/XalanTransformer/XalanTransformer.cpp src/xalanc/XalanTransformer/XalanTransformer.hpp Date: Thu, 18 Sep 2008 06:09:54 -0000 To: xalan-cvs@xml.apache.org From: dbertoni@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080918060954.52D86238896B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dbertoni Date: Wed Sep 17 23:09:53 2008 New Revision: 696567 URL: http://svn.apache.org/viewvc?rev=696567&view=rev Log: Finish implementing exclusion of test cases that are known to be bad. Modified: xalan/c/trunk/Tests/Conf/conf.cpp xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.cpp xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.hpp Modified: xalan/c/trunk/Tests/Conf/conf.cpp URL: http://svn.apache.org/viewvc/xalan/c/trunk/Tests/Conf/conf.cpp?rev=696567&r1=696566&r2=696567&view=diff ============================================================================== --- xalan/c/trunk/Tests/Conf/conf.cpp (original) +++ xalan/c/trunk/Tests/Conf/conf.cpp Wed Sep 17 23:09:53 2008 @@ -114,8 +114,12 @@ static const char* const excludeStylesheets[] = { - "attribset29.xsl", // Excluded because it's broken. See Jira issue XALANJ-2412. - "idkey31.xsl", // Excluded because Xalan-C++ deviates from the standard WRT namespace nodes. + // Excluded because it's broken. See Jira issue XALANJ-2412. + "attribset29.xsl", + + // Excluded because Xalan-C++ deviates from the standard WRT namespace nodes. + "idkey31.xsl", + // $$$TODO: These are temporarily disabled, waiting for Xalan-J to implement erratum #23. "numbering21.xsl", "numbering29.xsl", @@ -124,28 +128,122 @@ "numbering68.xsl", "numbering69.xsl", "numbering83.xsl", - "output22.xsl", // Excluded because it outputs EBCDIC and HTML, which cannot be parsed. - "variable20.xsl", // Excluded because it shadows a variable name, which is illegal. - "variable56.xsl", // Excluded because it shadows a variable name, which is illegal. + + // These numberformat tests fail because they test edge cases, and the ICU handles these + // differently than Java does. + // $$$TODO: Perhaps ICU will address these issues at some point. + "numberformat11.xsl", + "numberformat17.xsl", + "numberformat25.xsl", + "numberformat30.xsl", + "numberformat34.xsl", + "numberformat35.xsl", + + // Excluded because it outputs EBCDIC and HTML, which cannot be parsed. + "output22.xsl", + + // These sort tests are disabled because the ICU implements a more recent version of the + // the Unicode collation algorithm, so we won't match the Java results. + "sort08.xsl", + "sort27.xsl", + + // These string tests exceed the resolution of printf, so until we have a better + // implementation, these will fail. + "string132.xsl", + "string134.xsl", + "string135.xsl", + + // These variable tests are incorrect, because they violate the XSLT recommendation, + // which disallows shadowing a variable name. + "variable20.xsl", + "variable56.xsl", 0 }; +static const char* const excludeStylesheetsWithoutICU[] = +{ + // These numberformat tests fail because we don't implement format-number without + // ICU integration. + "numberformat01.xsl", + "numberformat02.xsl", + "numberformat03.xsl", + "numberformat04.xsl", + "numberformat05.xsl", + "numberformat06.xsl", + "numberformat07.xsl", + "numberformat08.xsl", + "numberformat09.xsl", + "numberformat12.xsl", + "numberformat13.xsl", + "numberformat16.xsl", + "numberformat18.xsl", + "numberformat19.xsl", + "numberformat20.xsl", + "numberformat21.xsl", + "numberformat22.xsl", + "numberformat23.xsl", + "numberformat24.xsl", + "numberformat26.xsl", + "numberformat27.xsl", + "numberformat28.xsl", + "numberformat29.xsl", + "numberformat31.xsl", + "numberformat32.xsl", + "numberformat36.xsl", + "numberformat45.xsl", + "numberformat46.xsl", + + // These sort tests are disabled because, without the ICU, we don't implement proper + // sorting, including support for the case-order attribute of xsl:sort. + // $$$TODO: Basic support for ASCII-only case order is being worked on. + "sort15.xsl", + + // These string tests using format-number(), which is not implemented without ICU + // integration. + "string108.xsl", + "string109.xsl", + "string110.xsl", + "string132.xsl", + "string134.xsl", + "string135.xsl", + 0 +}; inline bool checkForExclusion( const XalanDOMString& currentFile, + bool isICUIntegrated, MemoryManager& theMemoryManager) { +#if defined(XALAN_STRICT_ANSI_HEADERS) + using std::strcmp; +#endif + + CharVectorType theFileName(theMemoryManager); + + currentFile.transcode(theFileName); + for (size_t i = 0; excludeStylesheets[i] != 0; ++i) - { - if (currentFile == XalanDOMString(excludeStylesheets[i], theMemoryManager)) + { + if (!strcmp(c_str(theFileName), excludeStylesheets[i])) { return true; } } + if (!isICUIntegrated) + { + for (size_t i = 0; excludeStylesheetsWithoutICU[i] != 0; ++i) + { + if (!strcmp(c_str(theFileName), excludeStylesheetsWithoutICU[i])) + { + return true; + } + } + } + return false; } @@ -289,6 +387,8 @@ { XalanTransformer xalan(theMemoryManager); + const bool isICUAvailable = xalan.getICUAvailable(); + const XalanDOMString resultFilePrefix("conf", theMemoryManager); // This & UniqRunid used for log file name. XalanDOMString UniqRunid(theMemoryManager); h.generateUniqRunid(UniqRunid); @@ -352,7 +452,7 @@ XalanXMLFileReporter::Hashtable attrs(theMemoryManager); const XalanDOMString& currentFile = files[i]; - if (checkForExclusion(currentFile, theMemoryManager)) + if (checkForExclusion(currentFile, isICUAvailable, theMemoryManager)) continue; h.data.testOrFile = currentFile; Modified: xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.cpp URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.cpp?rev=696567&r1=696566&r2=696567&view=diff ============================================================================== --- xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.cpp (original) +++ xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.cpp Wed Sep 17 23:09:53 2008 @@ -248,6 +248,18 @@ +bool +XalanTransformer::getICUAvailable() const +{ +#if defined(XALAN_USE_ICU) + return true; +#else + return false; +#endif +} + + + static void addTraceListeners( const XalanTransformer::TraceListenerVectorType& theTraceListeners, Modified: xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.hpp URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.hpp?rev=696567&r1=696566&r2=696567&view=diff ============================================================================== --- xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.hpp (original) +++ xalan/c/trunk/src/xalanc/XalanTransformer/XalanTransformer.hpp Wed Sep 17 23:09:53 2008 @@ -923,6 +923,9 @@ return m_warningStream; } + bool + getICUAvailable() const; + typedef XalanVector CompiledStylesheetPtrVectorType; typedef XalanVector ParsedSourcePtrVectorType; --------------------------------------------------------------------- To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org For additional commands, e-mail: xalan-cvs-help@xml.apache.org