Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
9c6774f1
Commit
9c6774f1
authored
Mar 19, 2004
by
Uwe Bonnes
Committed by
Alexandre Julliard
Mar 19, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Relay msvcrt_memcpy to memmove, CString::Insert seems to rely on that
behaviour. Add a test case.
parent
d09edf80
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
55 additions
and
2 deletions
+55
-2
msvcrt.spec
dlls/msvcrt/msvcrt.spec
+1
-1
.cvsignore
dlls/msvcrt/tests/.cvsignore
+1
-0
Makefile.in
dlls/msvcrt/tests/Makefile.in
+2
-1
string.c
dlls/msvcrt/tests/string.c
+51
-0
No files found.
dlls/msvcrt/msvcrt.spec
View file @
9c6774f1
...
...
@@ -666,7 +666,7 @@
@ cdecl mbtowc(wstr str long) MSVCRT_mbtowc
@ cdecl memchr(ptr long long)
@ cdecl memcmp(ptr ptr long)
@ cdecl memcpy(ptr ptr long)
@ cdecl memcpy(ptr ptr long)
memmove
@ cdecl memmove(ptr ptr long)
@ cdecl memset(ptr long long)
@ cdecl mktime(ptr) MSVCRT_mktime
...
...
dlls/msvcrt/tests/.cvsignore
View file @
9c6774f1
...
...
@@ -3,4 +3,5 @@ cpp.ok
file.ok
heap.ok
scanf.ok
string.ok
testlist.c
dlls/msvcrt/tests/Makefile.in
View file @
9c6774f1
...
...
@@ -10,7 +10,8 @@ CTESTS = \
cpp.c
\
file.c
\
heap.c
\
scanf.c
scanf.c
\
string.c
@MAKE_TEST_RULES@
...
...
dlls/msvcrt/tests/string.c
0 → 100644
View file @
9c6774f1
/*
* Unit test suite for string functions.
*
* Copyright 2004 Uwe Bonnes
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "wine/test.h"
#include "winbase.h"
#include <string.h>
#include <stdlib.h>
static
void
*
(
*
pmemcpy
)(
void
*
,
const
void
*
,
size_t
n
);
static
int
*
(
*
pmemcmp
)(
void
*
,
const
void
*
,
size_t
n
);
#define SETNOFAIL(x,y) x = (void*)GetProcAddress(hMsvcrt,y)
#define SET(x,y) SETNOFAIL(x,y); ok(x != NULL, "Export '%s' not found\n", y)
START_TEST
(
string
)
{
void
*
mem
;
char
xilstring
[]
=
"c:/xilinx"
;
int
nLen
=
strlen
(
xilstring
);
HMODULE
hMsvcrt
=
LoadLibraryA
(
"msvcrt.dll"
);
ok
(
hMsvcrt
!=
0
,
"LoadLibraryA failed
\n
"
);
SET
(
pmemcpy
,
"memcpy"
);
SET
(
pmemcmp
,
"memcmp"
);
/* MSVCRT memcpy behaves like memmove for overlapping moves,
MFC42 CString::Insert seems to rely on that behaviour */
mem
=
malloc
(
100
);
ok
(
mem
!=
NULL
,
"memory not allocated for size 0
\n
"
);
strcpy
((
char
*
)
mem
,
xilstring
);
pmemcpy
((
char
*
)
mem
+
5
,
mem
,
nLen
+
1
);
ok
(
pmemcmp
((
char
*
)
mem
+
5
,
xilstring
,
nLen
)
==
0
,
"Got result %s
\n
"
,(
char
*
)
mem
+
5
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment