apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: apr/test CuTest.c CuTest.h
Date Sat, 23 Nov 2002 20:58:30 GMT
rbb         2002/11/23 12:58:30

  Modified:    test     CuTest.c CuTest.h
  Log:
  Add some const good-ness
  
  Revision  Changes    Path
  1.10      +4 -4      apr/test/CuTest.c
  
  Index: CuTest.c
  ===================================================================
  RCS file: /home/cvs/apr/test/CuTest.c,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- CuTest.c	14 Nov 2002 12:16:35 -0000	1.9
  +++ CuTest.c	23 Nov 2002 20:58:30 -0000	1.10
  @@ -60,7 +60,7 @@
   	return new;
   }
   
  -char* CuStrCopy(char* old)
  +char* CuStrCopy(const char* old)
   {
   	int len = strlen(old);
   	char* new = CuStrAlloc(len + 1);
  @@ -150,7 +150,7 @@
   	return tc;
   }
   
  -void CuNotImpl(CuTest* tc, char* message)
  +void CuNotImpl(CuTest* tc, const char* message)
   {
   	CuString* newstr = CuStringNew();
           CuStringAppend(newstr, message);
  @@ -160,14 +160,14 @@
   	if (tc->jumpBuf != 0) longjmp(*(tc->jumpBuf), 0);
   }
   
  -void CuFail(CuTest* tc, char* message)
  +void CuFail(CuTest* tc, const char* message)
   {
   	tc->failed = 1;
   	tc->message = CuStrCopy(message);
   	if (tc->jumpBuf != 0) longjmp(*(tc->jumpBuf), 0);
   }
   
  -void CuAssert(CuTest* tc, char* message, int condition)
  +void CuAssert(CuTest* tc, const char* message, int condition)
   {
   	if (condition) return;
   	CuFail(tc, message);
  
  
  
  1.7       +4 -4      apr/test/CuTest.h
  
  Index: CuTest.h
  ===================================================================
  RCS file: /home/cvs/apr/test/CuTest.h,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- CuTest.h	14 Nov 2002 12:16:35 -0000	1.6
  +++ CuTest.h	23 Nov 2002 20:58:30 -0000	1.7
  @@ -38,7 +38,7 @@
   /* CuString */
   
   char* CuStrAlloc(int size);
  -char* CuStrCopy(char* old);
  +char* CuStrCopy(const char* old);
   
   #define CU_ALLOC(TYPE)		((TYPE*) malloc(sizeof(TYPE)))
   
  @@ -81,9 +81,9 @@
   void CuInit(int argc, char *argv[]);
   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 CuFail(CuTest* tc, const char* message);
  +void CuNotImpl(CuTest* tc, const char* message);
  +void CuAssert(CuTest* tc, const char* message, int condition);
   void CuAssertTrue(CuTest* tc, int condition);
   void CuAssertStrEquals(CuTest* tc, const char* expected, const char* actual);
   void CuAssertIntEquals(CuTest* tc, int expected, int actual);
  
  
  

Mime
View raw message