apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: apr/test CuTest.c CuTest.h testall.c
Date Thu, 14 Nov 2002 12:16:36 GMT
jorton      2002/11/14 04:16:35

  Modified:    test     CuTest.c CuTest.h testall.c
  Log:
  Change CuSuiteListDetails function to return the number of tests which
  failed.  Use this in testall's main() to return a non-zero exit code
  iff any tests failed.
  
  Revision  Changes    Path
  1.9       +2 -1      apr/test/CuTest.c
  
  Index: CuTest.c
  ===================================================================
  RCS file: /home/cvs/apr/test/CuTest.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- CuTest.c	11 Nov 2002 22:46:57 -0000	1.8
  +++ CuTest.c	14 Nov 2002 12:16:35 -0000	1.9
  @@ -407,7 +407,7 @@
   	CuStringAppend(summary, "\n");
   }
   
  -void CuSuiteListDetails(CuSuiteList* testSuite, CuString* details)
  +int CuSuiteListDetails(CuSuiteList* testSuite, CuString* details)
   {
   	int i;
   	int failCount = 0;
  @@ -453,5 +453,6 @@
   			}
   		}
   	} 
  +	return failCount;
   }
   
  
  
  
  1.6       +3 -1      apr/test/CuTest.h
  
  Index: CuTest.h
  ===================================================================
  RCS file: /home/cvs/apr/test/CuTest.h,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CuTest.h	23 Oct 2002 23:28:12 -0000	1.5
  +++ CuTest.h	14 Nov 2002 12:16:35 -0000	1.6
  @@ -130,6 +130,8 @@
   void CuSuiteListRun(CuSuiteList* testSuite);
   void CuSuiteListRunWithSummary(CuSuiteList* testSuite);
   void CuSuiteListSummary(CuSuiteList* testSuite, CuString* summary);
  -void CuSuiteListDetails(CuSuiteList* testSuite, CuString* details);
  +/* Print details of test suite results; returns total number of
  + * tests which failed. */
  +int CuSuiteListDetails(CuSuiteList* testSuite, CuString* details);
   #endif /* CU_TEST_H */
   
  
  
  
  1.14      +2 -2      apr/test/testall.c
  
  Index: testall.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testall.c,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- testall.c	11 Nov 2002 04:54:45 -0000	1.13
  +++ testall.c	14 Nov 2002 12:16:35 -0000	1.14
  @@ -97,8 +97,8 @@
       }
   
       CuSuiteListRunWithSummary(alltests);
  -    CuSuiteListDetails(alltests, output);
  +    i = CuSuiteListDetails(alltests, output);
       printf("%s\n", output->buffer);
  -    return 0;
  +    return i > 0 ? 1 : 0;
   }
   
  
  
  

Mime
View raw message