]> pd.if.org Git - pdclib.old/blobdiff - functions/string/strlen.c
Add _cbprintf/_vcbprintf (callback based printf formatters)
[pdclib.old] / functions / string / strlen.c
index da5bc4093af805dddfdcf274f12cc19f6704f6e5..c9ac46568e17a30d15ab84efded6320f36459a4f 100644 (file)
@@ -1,7 +1,5 @@
 /* $Id$ */
 
-/* Release $Name$ */
-
 /* strlen( const char * )
 
    This file is part of the Public Domain C Library (PDCLib).
@@ -10,6 +8,8 @@
 
 #include <string.h>
 
+#ifndef REGTEST
+
 size_t strlen( const char * s )
 {
     size_t rc = 0;
@@ -20,11 +20,15 @@ size_t strlen( const char * s )
     return rc;
 }
 
-#warning Test driver missing.
+#endif
 
 #ifdef TEST
-int main()
+#include <_PDCLIB_test.h>
+
+int main( void )
 {
-    return 0;
+    TESTCASE( strlen( abcde ) == 5 );
+    TESTCASE( strlen( "" ) == 0 );
+    return TEST_RESULTS;
 }
 #endif