mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
2003-01-06 Roland McGrath <roland@redhat.com>
* string/tester.c (test_strcpy): Add test with `void *' arguments.
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
/* Tester for string functions.
|
/* 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.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
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, 14, "44444444444444", 55);
|
||||||
SIMPLE_COPY(strcpy, 15, "555555555555555", 56);
|
SIMPLE_COPY(strcpy, 15, "555555555555555", 56);
|
||||||
SIMPLE_COPY(strcpy, 16, "6666666666666666", 57);
|
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
|
static void
|
||||||
|
Reference in New Issue
Block a user