aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2003-01-07 07:38:02 +0000
committerRoland McGrath <roland@gnu.org>2003-01-07 07:38:02 +0000
commitf7a1f1a0a1588434eff7dc9b319a64dcc480d6cf (patch)
treef4b092aa9374f92fea2c0ef1af6b492438a076ea
parent6876cdf8534b591dcbfc397af2aae519708b5efc (diff)
downloadglibc-f7a1f1a0a1588434eff7dc9b319a64dcc480d6cf.zip
glibc-f7a1f1a0a1588434eff7dc9b319a64dcc480d6cf.tar.gz
glibc-f7a1f1a0a1588434eff7dc9b319a64dcc480d6cf.tar.bz2
2003-01-06 Roland McGrath <roland@redhat.com>
* string/tester.c (test_strcpy): Add test with `void *' arguments.
-rw-r--r--string/tester.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/string/tester.c b/string/tester.c
index eb630a1..dab5705 100644
--- a/string/tester.c
+++ b/string/tester.c
@@ -1,5 +1,5 @@
/* Tester for string functions.
- Copyright (C) 1995-2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1995-2000, 2001, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -173,6 +173,12 @@ test_strcpy (void)
SIMPLE_COPY(strcpy, 14, "44444444444444", 55);
SIMPLE_COPY(strcpy, 15, "555555555555555", 56);
SIMPLE_COPY(strcpy, 16, "6666666666666666", 57);
+
+ /* Simple test using implicitly coerced `void *' arguments. */
+ const void *src = "frobozz";
+ void *dst = one;
+ check (strcpy (dst, src) == dst, 1);
+ equal (dst, "frobozz", 2);
}
static void