You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by am...@apache.org on 2007/02/02 18:35:26 UTC

svn commit: r502666 [2/2] - in /xerces/c/trunk: Projects/Win32/BCB6/Xerces-all/XercesLib/ Projects/Win32/BCC.551/Xerces-all/XercesLib/ Projects/Win32/VC6/xerces-all/XercesLib/ Projects/Win32/VC7.1/xerces-all/XercesLib/ Projects/Win32/VC8/xerces-all/Xer...

Modified: xerces/c/trunk/tests/src/XSTSHarness/XSTSHarnessHandlers.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/tests/src/XSTSHarness/XSTSHarnessHandlers.cpp?view=diff&rev=502666&r1=502665&r2=502666
==============================================================================
--- xerces/c/trunk/tests/src/XSTSHarness/XSTSHarnessHandlers.cpp (original)
+++ xerces/c/trunk/tests/src/XSTSHarness/XSTSHarnessHandlers.cpp Fri Feb  2 09:35:22 2007
@@ -172,7 +172,7 @@
                 XERCES_STD_QUALIFIER cout << "Test " << StrX(fCurrentTest.fTestName) << " skipped" << XERCES_STD_QUALIFIER endl;
                 return;
             }
-            bool success=true;
+            bool success=true, fatalFailure=false;
             try
             {
                 fErrorHandler.resetErrors();
@@ -181,6 +181,7 @@
             }
             catch (const OutOfMemoryException&)
             {
+                fatalFailure=true;
                 XERCES_STD_QUALIFIER cout << "Test " << StrX(fCurrentTest.fTestName) << " ran out of memory" << XERCES_STD_QUALIFIER endl;
                 success=false;
             }
@@ -191,31 +192,42 @@
             }
             catch (...)
             {
+                fatalFailure=true;
                 XERCES_STD_QUALIFIER cout << "Test " << StrX(fCurrentTest.fTestName) << " crashed" << XERCES_STD_QUALIFIER endl;
                 success=false;
             }
             fTests++;
-            if(success && !fErrorHandler.getSawErrors())
+            if(fatalFailure)
             {
-                if(fCurrentTest.fExpectedResult!=valid)
-                {
-                    // skip the rest of the group, as we had problems with the schema itself
-                    fCurrentTest.fSkipped=true;
-                    fFailures++;
-                    XERCES_STD_QUALIFIER cout << "Test " << StrX(fCurrentTest.fTestName) << " succeeded but was expected to fail" << XERCES_STD_QUALIFIER endl;
-                    printFile(fCurrentTest.fXSDName);
-                }
+                // skip the rest of the group, as we had problems with the schema itself
+                fCurrentTest.fSkipped=true;
+                fFailures++;
+                printFile(fCurrentTest.fXSDName);
             }
             else
             {
-                if(fCurrentTest.fExpectedResult!=invalid)
+                if(success && !fErrorHandler.getSawErrors())
+                {
+                    if(fCurrentTest.fExpectedResult!=valid)
+                    {
+                        // skip the rest of the group, as we had problems with the schema itself
+                        fCurrentTest.fSkipped=true;
+                        fFailures++;
+                        XERCES_STD_QUALIFIER cout << "Test " << StrX(fCurrentTest.fTestName) << " succeeded but was expected to fail" << XERCES_STD_QUALIFIER endl;
+                        printFile(fCurrentTest.fXSDName);
+                    }
+                }
+                else
                 {
-                    // skip the rest of the group, as we had problems with the schema itself
-                    fCurrentTest.fSkipped=true;
-                    fFailures++;
-                    XERCES_STD_QUALIFIER cout << "Test " << StrX(fCurrentTest.fTestName) << " failed but was expected to pass" << XERCES_STD_QUALIFIER endl;
-                    XERCES_STD_QUALIFIER cout << "Reported error: " << StrX(fErrorHandler.getErrorText()) << XERCES_STD_QUALIFIER endl;
-                    printFile(fCurrentTest.fXSDName);
+                    if(fCurrentTest.fExpectedResult!=invalid)
+                    {
+                        // skip the rest of the group, as we had problems with the schema itself
+                        fCurrentTest.fSkipped=true;
+                        fFailures++;
+                        XERCES_STD_QUALIFIER cout << "Test " << StrX(fCurrentTest.fTestName) << " failed but was expected to pass" << XERCES_STD_QUALIFIER endl;
+                        XERCES_STD_QUALIFIER cout << "Reported error: " << StrX(fErrorHandler.getErrorText()) << XERCES_STD_QUALIFIER endl;
+                        printFile(fCurrentTest.fXSDName);
+                    }
                 }
             }
         }
@@ -228,7 +240,7 @@
                 XERCES_STD_QUALIFIER cout << "Test " << StrX(fCurrentTest.fTestName) << " skipped" << XERCES_STD_QUALIFIER endl;
                 return;
             }
-            bool success=true;
+            bool success=true, fatalFailure=false;
             try
             {
                 fErrorHandler.resetErrors();
@@ -236,6 +248,7 @@
             }
             catch (const OutOfMemoryException&)
             {
+                fatalFailure=true;
                 XERCES_STD_QUALIFIER cout << "Test " << StrX(fCurrentTest.fTestName) << " ran out of memory" << XERCES_STD_QUALIFIER endl;
                 success=false;
             }
@@ -246,29 +259,39 @@
             }
             catch (...)
             {
+                fatalFailure=true;
                 XERCES_STD_QUALIFIER cout << "Test " << StrX(fCurrentTest.fTestName) << " crashed" << XERCES_STD_QUALIFIER endl;
                 success=false;
             }
             fTests++;
-            if(success && !fErrorHandler.getSawErrors())
+            if(fatalFailure)
             {
-                if(fCurrentTest.fExpectedResult!=valid)
-                {
-                    fFailures++;
-                    XERCES_STD_QUALIFIER cout << "Test " << StrX(fCurrentTest.fTestName) << " succeeded but was expected to fail" << XERCES_STD_QUALIFIER endl;
-                    printFile(fCurrentTest.fXSDName);
-                    printFile(fCurrentTest.fXMLName);
-                }
+                fFailures++;
+                printFile(fCurrentTest.fXSDName);
+                printFile(fCurrentTest.fXMLName);
             }
             else
             {
-                if(fCurrentTest.fExpectedResult!=invalid)
+                if(success && !fErrorHandler.getSawErrors())
+                {
+                    if(fCurrentTest.fExpectedResult!=valid)
+                    {
+                        fFailures++;
+                        XERCES_STD_QUALIFIER cout << "Test " << StrX(fCurrentTest.fTestName) << " succeeded but was expected to fail" << XERCES_STD_QUALIFIER endl;
+                        printFile(fCurrentTest.fXSDName);
+                        printFile(fCurrentTest.fXMLName);
+                    }
+                }
+                else
                 {
-                    fFailures++;
-                    XERCES_STD_QUALIFIER cout << "Test " << StrX(fCurrentTest.fTestName) << " failed but was expected to pass" << XERCES_STD_QUALIFIER endl;
-                    XERCES_STD_QUALIFIER cout << "Reported error: " << StrX(fErrorHandler.getErrorText()) << XERCES_STD_QUALIFIER endl;
-                    printFile(fCurrentTest.fXSDName);
-                    printFile(fCurrentTest.fXMLName);
+                    if(fCurrentTest.fExpectedResult!=invalid)
+                    {
+                        fFailures++;
+                        XERCES_STD_QUALIFIER cout << "Test " << StrX(fCurrentTest.fTestName) << " failed but was expected to pass" << XERCES_STD_QUALIFIER endl;
+                        XERCES_STD_QUALIFIER cout << "Reported error: " << StrX(fErrorHandler.getErrorText()) << XERCES_STD_QUALIFIER endl;
+                        printFile(fCurrentTest.fXSDName);
+                        printFile(fCurrentTest.fXMLName);
+                    }
                 }
             }
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org