aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjthorn <jthorn@df1f8a13-aa1d-4dd4-9681-27ded5b42416>2003-05-02 18:58:47 +0000
committerjthorn <jthorn@df1f8a13-aa1d-4dd4-9681-27ded5b42416>2003-05-02 18:58:47 +0000
commitfb4f5d782f627d5fff8763ee076866b8d222f037 (patch)
tree43bff660e8966ee97d859589a419019c454ec7d1
parent17f3e3dcb47c4b1f83f6737e61a4a3d47a067038 (diff)
don't need this file any more because the routine we're testing is
now in the flesh (src/util/String.c) with the test code there as well git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/LocalInterp/trunk@150 df1f8a13-aa1d-4dd4-9681-27ded5b42416
-rw-r--r--src/GeneralizedPolynomial-Uniform/test_strlcpy.c74
1 files changed, 0 insertions, 74 deletions
diff --git a/src/GeneralizedPolynomial-Uniform/test_strlcpy.c b/src/GeneralizedPolynomial-Uniform/test_strlcpy.c
deleted file mode 100644
index 247c972..0000000
--- a/src/GeneralizedPolynomial-Uniform/test_strlcpy.c
+++ /dev/null
@@ -1,74 +0,0 @@
-/* test_strlcpy -- test driver for Util_Strlcpy() */
-/* $Header$ */
-
-#include <string.h>
-#include <stdio.h>
-
-#ifndef LOCALINTERP_STANDALONE_BUILD
- #include "cctk.h"
-#endif
-
-#include "InterpLocalUniform.h"
-
-/******************************************************************************/
-
-/* prototypes */
-size_t tryit(size_t dst_size, const char* src);
-void nprint(int n_print, const char* buf);
-
-/* global data structures */
-static char buffer[100];
-
-/******************************************************************************/
-
-/*
- * This program is a test driver for Util_Strlcpy() .
- */
-
-int main(void)
-{
-size_t n;
-
-n = tryit(9, "hello");
-printf("bufsize=9: result=%d buffer=", (int) n);
-nprint(9, buffer);
-
-n = tryit(6, "hello");
-printf("bufsize=6: result=%d buffer=", (int) n);
-nprint(6, buffer);
-
-n = tryit(5, "hello");
-printf("bufsize=5: result=%d buffer=", (int) n);
-nprint(5, buffer);
-
-n = tryit(4, "hello");
-printf("bufsize=4: result=%d buffer=", (int) n);
-nprint(4, buffer);
-
-return 0;
-}
-
-/******************************************************************************/
-
-size_t tryit(size_t dst_size, const char* src)
-{
-strcpy(buffer, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
-return LocalInterp_Strlcpy(buffer, src, dst_size);
-}
-
-/******************************************************************************/
-
-/* print n_print characters of buf[], with visible indication of '\0' */
-void nprint(int n_print, const char* buf)
-{
-int i;
-
-printf("\"");
- for (i = 0 ; i < n_print ; ++i)
- {
- if (buf[i] == '\0')
- then printf("\\0");
- else printf("%c", buf[i]);
- }
-printf("\"\n");
-}