rbb 2002/11/26 21:28:38
Modified: test CuTest.c CuTest.h
Log:
Add some const saftey to CuTest
Revision Changes Path
1.11 +2 -2 apr/test/CuTest.c
Index: CuTest.c
===================================================================
RCS file: /home/cvs/apr/test/CuTest.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- CuTest.c 23 Nov 2002 20:58:30 -0000 1.10
+++ CuTest.c 27 Nov 2002 05:28:38 -0000 1.11
@@ -200,7 +200,7 @@
CuFail(tc, buf);
}
-void CuAssertPtrEquals(CuTest* tc, void* expected, void* actual)
+void CuAssertPtrEquals(CuTest* tc, const void* expected, const void* actual)
{
char buf[STRING_MAX];
if (expected == actual) return;
@@ -208,7 +208,7 @@
CuFail(tc, buf);
}
-void CuAssertPtrNotNull(CuTest* tc, void* pointer)
+void CuAssertPtrNotNull(CuTest* tc, const void* pointer)
{
char buf[STRING_MAX];
if (pointer != NULL ) return;
1.8 +2 -2 apr/test/CuTest.h
Index: CuTest.h
===================================================================
RCS file: /home/cvs/apr/test/CuTest.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- CuTest.h 23 Nov 2002 20:58:30 -0000 1.7
+++ CuTest.h 27 Nov 2002 05:28:38 -0000 1.8
@@ -87,8 +87,8 @@
void CuAssertTrue(CuTest* tc, int condition);
void CuAssertStrEquals(CuTest* tc, const char* expected, const char* actual);
void CuAssertIntEquals(CuTest* tc, int expected, int actual);
-void CuAssertPtrEquals(CuTest* tc, void* expected, void* actual);
-void CuAssertPtrNotNull(CuTest* tc, void* pointer);
+void CuAssertPtrEquals(CuTest* tc, const void* expected, const void* actual);
+void CuAssertPtrNotNull(CuTest* tc, const void* pointer);
void CuTestRun(CuTest* tc);
/* CuSuite */