Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
73e669c6
Commit
73e669c6
authored
Mar 20, 2010
by
Detlef Riekenberg
Committed by
Alexandre Julliard
Mar 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcr90/tests: Add tests for _initterm_e.
parent
877a4e61
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
213 additions
and
0 deletions
+213
-0
configure
configure
+1
-0
configure.ac
configure.ac
+1
-0
Makefile.in
dlls/msvcr90/tests/Makefile.in
+17
-0
msvcr90.c
dlls/msvcr90/tests/msvcr90.c
+150
-0
msvcr90.manifest
dlls/msvcr90/tests/msvcr90.manifest
+22
-0
msvcr90.rc
dlls/msvcr90/tests/msvcr90.rc
+22
-0
No files found.
configure
View file @
73e669c6
...
...
@@ -14359,6 +14359,7 @@ wine_fn_config_dll msvcr70 enable_msvcr70 msvcr70
wine_fn_config_dll msvcr71 enable_msvcr71 msvcr71
wine_fn_config_dll msvcr80 enable_msvcr80 msvcr80
wine_fn_config_dll msvcr90 enable_msvcr90 msvcr90
wine_fn_config_test dlls/msvcr90/tests msvcr90_test
wine_fn_config_dll msvcrt enable_msvcrt msvcrt
wine_fn_config_test dlls/msvcrt/tests msvcrt_test
wine_fn_config_dll msvcrt20 enable_msvcrt20 msvcrt20
...
...
configure.ac
View file @
73e669c6
...
...
@@ -2401,6 +2401,7 @@ WINE_CONFIG_DLL(msvcr70,,[msvcr70])
WINE_CONFIG_DLL(msvcr71,,[msvcr71])
WINE_CONFIG_DLL(msvcr80,,[msvcr80])
WINE_CONFIG_DLL(msvcr90,,[msvcr90])
WINE_CONFIG_TEST(dlls/msvcr90/tests)
WINE_CONFIG_DLL(msvcrt,,[msvcrt])
WINE_CONFIG_TEST(dlls/msvcrt/tests)
WINE_CONFIG_DLL(msvcrt20,,[msvcrt20])
...
...
dlls/msvcr90/tests/Makefile.in
0 → 100644
View file @
73e669c6
TOPSRCDIR
=
@top_srcdir@
TOPOBJDIR
=
../../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
TESTDLL
=
msvcr90.dll
APPMODE
=
-mno-cygwin
IMPORTS
=
kernel32
MODCFLAGS
=
@BUILTINFLAG@
EXTRAINCL
=
-I
$(TOPSRCDIR)
/include/msvcrt
C_SRCS
=
\
msvcr90.c
RC_SRCS
=
\
msvcr90.rc
@MAKE_TEST_RULES@
dlls/msvcr90/tests/msvcr90.c
0 → 100644
View file @
73e669c6
/*
* Copyright 2010 Detlef Riekenberg
*
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include <stdarg.h>
#include <stdlib.h>
#include <stdio.h>
#include <windef.h>
#include <winbase.h>
#include <errno.h>
#include "wine/test.h"
typedef
int
(
__cdecl
*
_INITTERM_E_FN
)(
void
);
static
int
(
__cdecl
*
p_initterm_e
)(
_INITTERM_E_FN
*
table
,
_INITTERM_E_FN
*
end
);
int
cb_called
[
4
];
/* ########## */
static
int
initterm_cb0
(
void
)
{
cb_called
[
0
]
++
;
return
0
;
}
static
int
initterm_cb1
(
void
)
{
cb_called
[
1
]
++
;
return
1
;
}
static
int
initterm_cb2
(
void
)
{
cb_called
[
2
]
++
;
return
2
;
}
static
void
test__initterm_e
(
void
)
{
_INITTERM_E_FN
table
[
4
];
int
res
;
if
(
!
p_initterm_e
)
{
skip
(
"_initterm_e not found
\n
"
);
return
;
}
memset
(
table
,
0
,
sizeof
(
table
));
memset
(
cb_called
,
0
,
sizeof
(
cb_called
));
errno
=
0xdeadbeef
;
res
=
p_initterm_e
(
table
,
table
);
ok
(
!
res
&&
!
cb_called
[
0
]
&&
!
cb_called
[
1
]
&&
!
cb_called
[
2
],
"got %d with 0x%x {%d, %d, %d}
\n
"
,
res
,
errno
,
cb_called
[
0
],
cb_called
[
1
],
cb_called
[
2
]);
memset
(
cb_called
,
0
,
sizeof
(
cb_called
));
errno
=
0xdeadbeef
;
res
=
p_initterm_e
(
table
,
NULL
);
ok
(
!
res
&&
!
cb_called
[
0
]
&&
!
cb_called
[
1
]
&&
!
cb_called
[
2
],
"got %d with 0x%x {%d, %d, %d}
\n
"
,
res
,
errno
,
cb_called
[
0
],
cb_called
[
1
],
cb_called
[
2
]);
if
(
0
)
{
/* this crash on Windows */
errno
=
0xdeadbeef
;
res
=
p_initterm_e
(
NULL
,
table
);
trace
(
"got %d with 0x%x
\n
"
,
res
,
errno
);
}
table
[
0
]
=
initterm_cb0
;
memset
(
cb_called
,
0
,
sizeof
(
cb_called
));
errno
=
0xdeadbeef
;
res
=
p_initterm_e
(
table
,
&
table
[
1
]);
ok
(
!
res
&&
(
cb_called
[
0
]
==
1
)
&&
!
cb_called
[
1
]
&&
!
cb_called
[
2
],
"got %d with 0x%x {%d, %d, %d}
\n
"
,
res
,
errno
,
cb_called
[
0
],
cb_called
[
1
],
cb_called
[
2
]);
/* init-function returning failure */
table
[
1
]
=
initterm_cb1
;
memset
(
cb_called
,
0
,
sizeof
(
cb_called
));
errno
=
0xdeadbeef
;
res
=
p_initterm_e
(
table
,
&
table
[
3
]);
ok
(
(
res
==
1
)
&&
(
cb_called
[
0
]
==
1
)
&&
(
cb_called
[
1
]
==
1
)
&&
!
cb_called
[
2
],
"got %d with 0x%x {%d, %d, %d}
\n
"
,
res
,
errno
,
cb_called
[
0
],
cb_called
[
1
],
cb_called
[
2
]);
/* init-function not called, when end < start */
memset
(
cb_called
,
0
,
sizeof
(
cb_called
));
errno
=
0xdeadbeef
;
res
=
p_initterm_e
(
&
table
[
3
],
table
);
ok
(
!
res
&&
!
cb_called
[
0
]
&&
!
cb_called
[
1
]
&&
!
cb_called
[
2
],
"got %d with 0x%x {%d, %d, %d}
\n
"
,
res
,
errno
,
cb_called
[
0
],
cb_called
[
1
],
cb_called
[
2
]);
/* initialization stop after first non-zero result */
table
[
2
]
=
initterm_cb0
;
memset
(
cb_called
,
0
,
sizeof
(
cb_called
));
errno
=
0xdeadbeef
;
res
=
p_initterm_e
(
table
,
&
table
[
3
]);
ok
(
(
res
==
1
)
&&
(
cb_called
[
0
]
==
1
)
&&
(
cb_called
[
1
]
==
1
)
&&
!
cb_called
[
2
],
"got %d with 0x%x {%d, %d, %d}
\n
"
,
res
,
errno
,
cb_called
[
0
],
cb_called
[
1
],
cb_called
[
2
]);
/* NULL pointer in the array are skipped */
table
[
1
]
=
NULL
;
table
[
2
]
=
initterm_cb2
;
memset
(
cb_called
,
0
,
sizeof
(
cb_called
));
errno
=
0xdeadbeef
;
res
=
p_initterm_e
(
table
,
&
table
[
3
]);
ok
(
(
res
==
2
)
&&
(
cb_called
[
0
]
==
1
)
&&
!
cb_called
[
1
]
&&
(
cb_called
[
2
]
==
1
),
"got %d with 0x%x {%d, %d, %d}
\n
"
,
res
,
errno
,
cb_called
[
0
],
cb_called
[
1
],
cb_called
[
2
]);
}
/* ########## */
START_TEST
(
msvcr90
)
{
HMODULE
hcrt
;
SetLastError
(
0xdeadbeef
);
hcrt
=
LoadLibraryA
(
"msvcr90.dll"
);
if
(
!
hcrt
)
{
win_skip
(
"msvcr90.dll not installed (got %d)
\n
"
,
GetLastError
());
return
;
}
p_initterm_e
=
(
void
*
)
GetProcAddress
(
hcrt
,
"_initterm_e"
);
test__initterm_e
();
}
dlls/msvcr90/tests/msvcr90.manifest
0 → 100644
View file @
73e669c6
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly
xmlns=
"urn:schemas-microsoft-com:asm.v1"
manifestVersion=
"1.0"
>
<assemblyIdentity
type=
"win32"
name=
"Wine.msvcr90.Test"
version=
"1.0.0.0"
processorArchitecture=
"*"
/>
<description>
Wine msvcr90 test suite
</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
type=
"win32"
name=
"microsoft.vc90.crt"
version=
"9.0.20718.0"
processorArchitecture=
"*"
publicKeyToken=
"1fc8b3b9a1e18e3b"
language=
"*"
/>
</dependentAssembly>
</dependency>
</assembly>
dlls/msvcr90/tests/msvcr90.rc
0 → 100644
View file @
73e669c6
/*
* Copyright (c) 2010 Detlef Riekenberg
*
* 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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "winuser.h"
/* @makedep: msvcr90.manifest */
1 RT_MANIFEST msvcr90.manifest
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