You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by rb...@apache.org on 2002/10/13 02:39:58 UTC

cvs commit: apr/test CuTest.c CuTest.h testtime.c

rbb         2002/10/12 17:39:58

  Modified:    test     CuTest.c CuTest.h testtime.c
  Log:
  Cleanup all warnings generated by the test suite code.
  
  Revision  Changes    Path
  1.3       +3 -12     apr/test/CuTest.c
  
  Index: CuTest.c
  ===================================================================
  RCS file: /home/cvs/apr/test/CuTest.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CuTest.c	16 Sep 2002 11:06:08 -0000	1.2
  +++ CuTest.c	13 Oct 2002 00:39:58 -0000	1.3
  @@ -34,6 +34,7 @@
   #include <stdlib.h>
   #include <stdio.h>
   #include <string.h>
  +#include <unistd.h>
   
   #include "CuTest.h"
   
  @@ -203,7 +204,7 @@
   {
   	char buf[STRING_MAX];
   	if (expected == actual) return;
  -	sprintf(buf, "expected pointer <0x%X> but was <0x%X>", expected, actual);
  +	sprintf(buf, "expected pointer <%p> but was <%p>", expected, actual);
   	CuFail(tc, buf);
   }
   
  @@ -211,7 +212,7 @@
   {
   	char buf[STRING_MAX];
   	if (pointer != NULL ) return;
  -	sprintf(buf, "null pointer unexpected", pointer);
  +	sprintf(buf, "null pointer unexpected, but was <%p>", pointer);
   	CuFail(tc, buf);
   }
   
  @@ -290,11 +291,6 @@
   
   void CuSuiteOverView(CuSuite* testSuite, CuString* details)
   {
  -	int i;
  -	int failCount = 0;
  -	int notImpleCount = 0;
  -	int passCount = testSuite->count - testSuite->failCount;
  -
   	CuStringAppendFormat(details, "%d %s run:  %d passed, %d failed, "
   			     "%d not implemented.\n",
   			     testSuite->count, 
  @@ -308,9 +304,6 @@
   {
   	int i;
   	int failCount = 0;
  -	int notImpleCount = 0;
  -	int passCount = testSuite->count - testSuite->failCount;
  -	char* testWord = passCount == 1 ? "test" : "tests";
   
   	if (testSuite->failCount != 0 && verbose)
   	{
  @@ -391,9 +384,7 @@
   	int i;
   	int failCount = 0;
   	int notImplCount = 0;
  -	int passCount = 0;
   	int count = 0;
  -	char *testWord = passCount == 1 ? "test" : "tests";
   
   	for (i = 0 ; i < testSuite->count ; ++i)
   	{
  
  
  
  1.3       +1 -0      apr/test/CuTest.h
  
  Index: CuTest.h
  ===================================================================
  RCS file: /home/cvs/apr/test/CuTest.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CuTest.h	16 Sep 2002 11:06:08 -0000	1.2
  +++ CuTest.h	13 Oct 2002 00:39:58 -0000	1.3
  @@ -82,6 +82,7 @@
   void CuTestInit(CuTest* t, char* name, TestFunction function);
   CuTest* CuTestNew(char* name, TestFunction function);
   void CuFail(CuTest* tc, char* message);
  +void CuNotImpl(CuTest* tc, char* message);
   void CuAssert(CuTest* tc, char* message, int condition);
   void CuAssertTrue(CuTest* tc, int condition);
   void CuAssertStrEquals(CuTest* tc, char* expected, char* actual);
  
  
  
  1.35      +0 -1      apr/test/testtime.c
  
  Index: testtime.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testtime.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- testtime.c	15 Sep 2002 22:51:28 -0000	1.34
  +++ testtime.c	13 Oct 2002 00:39:58 -0000	1.35
  @@ -255,7 +255,6 @@
       apr_status_t rv;
       apr_time_exp_t xt;
       char str[STR_SIZE];
  -    apr_size_t sz;
       apr_int32_t hr_off = -5 * 3600; /* 5 hours in seconds */
   
       rv = apr_time_exp_tz(&xt, now, hr_off);