Add a test framework for crt (ntdll, crtdll, msvcrt and static)

svn path=/trunk/; revision=56363
This commit is contained in:
Timo Kreuzer 2012-04-18 17:21:18 +00:00
parent 7bffecda7b
commit 005d1d2a0c
8 changed files with 2172 additions and 0 deletions

View file

@ -2,6 +2,7 @@
add_library(apitest apitest.c)
add_subdirectory(advapi32)
add_subdirectory(crt)
add_subdirectory(dciman32)
add_subdirectory(gdi32)
add_subdirectory(msvcrt)

View file

@ -0,0 +1,6 @@
spec2def(msvcrt_mini.dll msvcrt_mini.spec ADD_IMPORTLIB)
remove_definitions(-D_DLL -D__USE_CRTIMP)
include(ntdll_crt_apitest.cmake)
include(crtdll_crt_apitest.cmake)
include(msvcrt_crt_apitest.cmake)

View file

@ -0,0 +1,561 @@
list(APPEND SOURCE_CRTDLL
# _CIacos.c
# _CIasin.c
# _CIatan.c
# _CIatan2.c
# _CIcosh.c
# _CIcos.c
# _CIexp.c
# _CIfmod.c
# _CIlog.c
# _CIlog10.c
# _CIpow.c
# _CIsin.c
# _CIsinh.c
# _CIsqrt.c
# _CItan.c
# _CItanh.c
# _HUGE_dll.c
# _XcptFilter.c
# __GetMainArgs.c
# __argc_dll.c
# __argv_dll.c
# __dllonexit.c
# __doserrno.c
# __fpecode.c
# __isascii.c
# __iscsym.c
# __iscsymf.c
# __mb_cur_max_dll.c
# __pxcptinfoptrs.c
# __threadhandle.c
# __threadid.c
# __toascii.c
# _abnormal_termination.c
# _access.c
# _acmdln_dll.c
# _aexit_rtn_dll.c
# _amsg_exit.c
# _assert.c
# _basemajor_dll.c
# _baseminor_dll.c
# _baseversion_dll.c
# _beep.c
# _beginthread.c
# _c_exit.c
# _cabs.c
# _cexit.c
# _cgets.c
# _chdir.c
# _chdrive.c
# _chgsign.c
# _chmod.c
# _chsize.c
# _clearfp.c
# _close.c
# _commit.c
# _commode_dll.c
# _control87.c
# _controlfp.c
# _copysign.c
# _cprintf.c
# _cpumode_dll.c
# _cputs.c
# _creat.c
# _cscanf.c
# _ctype.c
# _cwait.c
# _daylight_dll.c
# _dup.c
# _dup2.c
# _ecvt.c
# _endthread.c
# _environ_dll.c
# _eof.c
# _errno.c
# _except_handler2.c
# _execl.c
# _execle.c
# _execlp.c
# _execlpe.c
# _execv.c
# _execve.c
# _execvp.c
# _execvpe.c
# _exit.c
# _expand.c
# _fcloseall.c
# _fcvt.c
# _fdopen.c
# _fgetchar.c
# _fgetwchar.c
# _filbuf.c
# _fileinfo_dll.c
# _filelength.c
# _fileno.c
# _findclose.c
# _findfirst.c
# _findnext.c
# _finite.c
# _flsbuf.c
# _flushall.c
# _fmode_dll.c
# _fpclass.c
# _fpieee_flt.c
# _fpreset.c
# _fputchar.c
# _fputwchar.c
# _fsopen.c
# _fstat.c
# _ftime.c
# _ftol.c
# _fullpath.c
# _futime.c
# _gcvt.c
# _get_osfhandle.c
# _getch.c
# _getche.c
# _getcwd.c
# _getdcwd.c
# _getdiskfree.c
# _getdllprocaddr.c
# _getdrive.c
# _getdrives.c
# _getpid.c
# _getsystime.c
# _getw.c
# _global_unwind2.c
# _heapchk.c
# _heapmin.c
# _heapset.c
# _heapwalk.c
# _hypot.c
# _initterm.c
# _iob.c
# _isatty.c
# _isctype.c
# _ismbbalnum.c
# _ismbbalpha.c
# _ismbbgraph.c
# _ismbbkalnum.c
# _ismbbkana.c
# _ismbbkpunct.c
# _ismbblead.c
# _ismbbprint.c
# _ismbbpunct.c
# _ismbbtrail.c
# _ismbcalpha.c
# _ismbcdigit.c
# _ismbchira.c
# _ismbckata.c
# _ismbcl0.c
# _ismbcl1.c
# _ismbcl2.c
# _ismbclegal.c
# _ismbclower.c
# _ismbcprint.c
# _ismbcspace.c
# _ismbcsymbol.c
# _ismbcupper.c
# _ismbslead.c
# _ismbstrail.c
# _isnan.c
# _itoa.c
# _itow.c
# _j0.c
# _j1.c
# _jn.c
# _kbhit.c
# _lfind.c
# _loaddll.c
# _local_unwind2.c
# _locking.c
# _logb.c
# _lrotl.c
# _lrotr.c
# _lsearch.c
# _lseek.c
# _ltoa.c
# _ltow.c
# _makepath.c
# _matherr.c
# _mbbtombc.c
# _mbbtype.c
# _mbccpy.c
# _mbcjistojms.c
# _mbcjmstojis.c
# _mbclen.c
# _mbctohira.c
# _mbctokata.c
# _mbctolower.c
# _mbctombb.c
# _mbctoupper.c
# _mbctype.c
# _mbsbtype.c
# _mbscat.c
# _mbschr.c
# _mbscmp.c
# _mbscpy.c
# _mbscspn.c
# _mbsdec.c
# _mbsdup.c
# _mbsicmp.c
# _mbsinc.c
# _mbslen.c
# _mbslwr.c
# _mbsnbcat.c
# _mbsnbcmp.c
# _mbsnbcnt.c
# _mbsnbcpy.c
# _mbsnbicmp.c
# _mbsnbset.c
# _mbsncat.c
# _mbsnccnt.c
# _mbsncmp.c
# _mbsncpy.c
# _mbsnextc.c
# _mbsnicmp.c
# _mbsninc.c
# _mbsnset.c
# _mbspbrk.c
# _mbsrchr.c
# _mbsrev.c
# _mbsset.c
# _mbsspn.c
# _mbsspnp.c
# _mbsstr.c
# _mbstok.c
# _mbstrlen.c
# _mbsupr.c
# _memccpy.c
# _memicmp.c
# _mkdir.c
# _mktemp.c
# _msize.c
# _nextafter.c
# _onexit.c
# _open.c
# _open_osfhandle.c
# _osmajor_dll.c
# _osminor_dll.c
# _osmode_dll.c
# _osver_dll.c
# _osversion_dll.c
# _pclose.c
# _pctype_dll.c
# _pgmptr_dll.c
# _pipe.c
# _popen.c
# _purecall.c
# _putch.c
# _putenv.c
# _putw.c
# _pwctype_dll.c
# _read.c
# _rmdir.c
# _rmtmp.c
# _rotl.c
# _rotr.c
# _scalb.c
# _searchenv.c
# _seterrormode.c
# _setjmp.c
# _setmode.c
# _setsystime.c
# _sleep.c
# _snprintf.c
# _snwprintf.c
# _sopen.c
# _spawnl.c
# _spawnle.c
# _spawnlp.c
# _spawnlpe.c
# _spawnv.c
# _spawnve.c
# _spawnvp.c
# _spawnvpe.c
# _splitpath.c
# _stat.c
# _statusfp.c
# _strcmpi.c
# _strdate.c
# _strdec.c
# _strdup.c
# _strerror.c
# _stricmp.c
# _stricoll.c
# _strinc.c
# _strlwr.c
# _strncnt.c
# _strnextc.c
# _strnicmp.c
# _strninc.c
# _strnset.c
# _strrev.c
# _strset.c
# _strspnp.c)
# _strtime.c
# _strupr.c
# _swab.c
# _sys_errlist.c
# _sys_nerr_dll.c
# _tell.c
# _tempnam.c
# _timezone_dll.c
# _tolower.c
# _toupper.c
# _tzname.c
# _tzset.c
# _ultoa.c
# _ultow.c
# _umask.c
# _ungetch.c
# _unlink.c
# _unloaddll.c
# _utime.c
# _vsnprintf.c
# _vsnwprintf.c
# _wcsdup.c
# _wcsicmp.c
# _wcsicoll.c
# _wcslwr.c
# _wcsnicmp.c
# _wcsnset.c
# _wcsrev.c
# _wcsset.c
# _wcsupr.c
# _winmajor_dll.c
# _winminor_dll.c
# _winver_dll.c
# _write.c
# _wtoi.c
# _wtol.c
# _y0.c
# _y1.c
# _yn.c
# abort.c
# abs.c
# acos.c
# asctime.c
# asin.c
# atan.c
# atan2.c
# atexit.c
# atof.c
# atoi.c
# atol.c
# bsearch.c
# calloc.c
# ceil.c
# clearerr.c
# clock.c
# cos.c
# cosh.c
# ctime.c
# difftime.c
# div.c
# exit.c
# exp.c
# fabs.c
# fclose.c
# feof.c
# ferror.c
# fflush.c
# fgetc.c
# fgetpos.c
# fgets.c
# fgetwc.c
# floor.c
# fmod.c
# fopen.c
# fprintf.c
# fputc.c
# fputs.c
# fputwc.c
# fread.c
# free.c
# freopen.c
# frexp.c
# fscanf.c
# fseek.c
# fsetpos.c
# ftell.c
# fwprintf.c
# fwrite.c
# fwscanf.c
# getc.c
# getchar.c
# getenv.c
# gets.c
# gmtime.c
# is_wctype.c
# isalnum.c
# isalpha.c
# iscntrl.c
# isdigit.c
# isgraph.c
# isleadbyte.c
# islower.c
# isprint.c
# ispunct.c
# isspace.c
# isupper.c
# iswalnum.c
# iswalpha.c
# iswascii.c
# iswcntrl.c
# iswctype.c
# iswdigit.c
# iswgraph.c
# iswlower.c
# iswprint.c
# iswpunct.c
# iswspace.c
# iswupper.c
# iswxdigit.c
# isxdigit.c
# labs.c
# ldexp.c
# ldiv.c
# localeconv.c
# localtime.c
# log.c
# log10.c
# longjmp.c
# malloc.c
# mblen.c
# mbstowcs.c
# mbtowc.c
# memchr.c
# memcmp.c
# memcpy.c
# memmove.c
# memset.c
# mktime.c
# modf.c
# perror.c
# pow.c
# printf.c
# putc.c
# putchar.c
# puts.c
# qsort.c
# raise.c
# rand.c
# realloc.c
# remove.c
# rename.c
# rewind.c
# scanf.c
# setbuf.c
# setlocale.c
# setvbuf.c
# signal.c
# sin.c
# sinh.c
# sprintf.c
# sqrt.c
# srand.c
# sscanf.c
# strcat.c
# strchr.c
# strcmp.c
# strcoll.c
strcpy.c
# strcspn.c
# strerror.c
# strftime.c
# strlen.c
# strncat.c
# strncmp.c
# strncpy.c
# strpbrk.c
# strrchr.c
# strspn.c
# strstr.c
# strtod.c
# strtok.c
# strtol.c
# strtoul.c
# strxfrm.c
# swprintf.c
# swscanf.c
# system.c
# tan.c
# tanh.c
# time.c
# tmpfile.c
# tmpnam.c
# tolower.c
# toupper.c
# towlower.c
# towupper.c
# ungetc.c
# ungetwc.c
# vfprintf.c
# vfwprintf.c
# vprintf.c
# vsprintf.c
# vswprintf.c
# vwprintf.c
# wcscat.c
# wcschr.c
# wcscmp.c
# wcscoll.c
# wcscpy.c
# wcscspn.c
# wcsftime.c
# wcslen.c
# wcsncat.c
# wcsncmp.c
# wcsncpy.c
# wcspbrk.c
# wcsrchr.c
# wcsspn.c
# wcsstr.c
# wcstod.c
# wcstok.c
# wcstol.c
# wcstombs.c
# wcstoul.c
# wcsxfrm.c
# wctomb.c
# wprintf.c
# wscanf.c
)
if (ARCH MATCHES i386)
list(APPEND SOURCE_CRTDLL
# _CIpow.c
# _ftol.c
# _alldiv.c
# _alldvrm.c
# _allmul.c
# _allrem.c
# _allshl.c
# _allshr.c
# _alloca_probe.c
# _aulldiv.c
# _aulldvrm.c
# _aullrem.c
# _aullshr.c
# _chkstk.c
)
elseif (ARCH MATCHES amd64)
list(APPEND SOURCE_CRTDLL
# __C_specific_handler
# _setjmp.c
# _setjmpex.c
# _local_unwind.c
# longjmp.c
)
endif()
add_executable(crtdll_crt_apitest testlist.c ${SOURCE_CRTDLL})
add_target_compile_definitions(crtdll_crt_apitest _DLL __USE_CRTIMP)
target_link_libraries(crtdll_crt_apitest wine ${PSEH_LIB})
set_module_type(crtdll_crt_apitest win32cui)
add_importlibs(crtdll_crt_apitest crtdll msvcrt_mini kernel32)
add_cd_file(TARGET crtdll_crt_apitest DESTINATION reactos/bin FOR all)

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,30 @@
@ cdecl fputs(str ptr) MSVCRT.fputs
@ extern _iob MSVCRT._iob
@ varargs fprintf(ptr str) MSVCRT.fprintf
@ cdecl vfprintf(ptr str ptr) MSVCRT.vfprintf
@ cdecl fflush(ptr) MSVCRT.fflush
@ cdecl setvbuf(ptr str long long) MSVCRT.setvbuf
@ cdecl _strdup(str) MSVCRT._strdup
@ cdecl __getmainargs(ptr ptr ptr long ptr) MSVCRT.__getmainargs
@ cdecl __setusermatherr(ptr) MSVCRT.__setusermatherr
@ cdecl _amsg_exit(long) MSVCRT._amsg_exit
@ cdecl __set_app_type(long) MSVCRT.__set_app_type
@ extern _fmode MSVCRT._fmode
@ cdecl _initterm(ptr ptr) MSVCRT._initterm
@ extern _acmdln MSVCRT._acmdln
@ cdecl signal(long long) MSVCRT.signal
@ cdecl _fpreset() MSVCRT._fpreset
@ cdecl _onexit(ptr) MSVCRT._onexit
@ cdecl __dllonexit(ptr ptr ptr) MSVCRT.__dllonexit
@ cdecl _unlock(long) MSVCRT._unlock
@ cdecl abort() MSVCRT.abort
@ cdecl calloc(long long) MSVCRT.calloc
@ cdecl malloc(long) MSVCRT.malloc
@ extern __initenv MSVCRT.__initenv
@ cdecl _cexit() MSVCRT._cexit
@ extern _winmajor MSVCRT._winmajor
@ cdecl __lconv_init() MSVCRT.__lconv_init
@ cdecl _lock(long) MSVCRT._lock
@ cdecl free(ptr) MSVCRT.free
@ cdecl exit(long) MSVCRT.exit

View file

@ -0,0 +1,161 @@
list(APPEND SOURCE_NTDLL
# _CIcos.c
# _CIlog.c
# _CIsin.c
# _CIsqrt.c
# __isascii.c
# __iscsym.c
# __iscsymf.c
# __toascii.c
# _atoi64.c
# _fltused.c
# _i64toa.c
# _i64tow.c
# _itoa.c
# _itow.c
# _lfind.c
# _ltoa.c
# _ltow.c
# _memccpy.c
# _memicmp.c
# _snprintf.c
# _snwprintf.c
# _splitpath.c
# _strcmpi == _stricmp
# _stricmp.c
# _strlwr.c
# _strnicmp.c
# _strupr.c
# _tolower.c
# _toupper.c
# _ui64toa.c
# _ui64tow.c
# _ultoa.c
# _ultow.c
# _vscwprintf.c
# _vsnprintf.c
# _vsnwprintf.c
# _wcsicmp.c
# _wcslwr.c
# _wcsnicmp.c
# _wcsupr.c
# _wtoi.c
# _wtoi64.c
# _wtol.c
# abs.c
# atan.c
# atoi.c
# atol.c
# bsearch.c
# ceil.c
# cos.c
# fabs.c
# floor.c
# isalnum.c
# isalpha.c
# iscntrl.c
# isdigit.c
# isgraph.c
# islower.c
# isprint.c
# ispunct.c
# isspace.c
# isupper.c
# iswalpha.c
# iswctype.c
# iswdigit.c
# iswlower.c
# iswspace.c
# iswxdigit.c
# isxdigit.c
# labs.c
# log.c
# mbstowcs.c
# memchr.c
# memcmp.c
# memcpy == memmove
# memmove.c
# memset.c
# pow.c
# qsort.c
# sin.c
# sprintf.c
# sqrt.c
# sscanf.c
# strcat.c
# strchr.c
# strcmp.c
strcpy.c
# strcspn.c
# strlen.c
# strncat.c
# strncmp.c
# strncpy.c
# strpbrk.c
# strrchr.c
# strspn.c
# strstr.c
# strtol.c
# strtoul.c
# swprintf.c
# tan.c
# tolower.c
# toupper.c
# towlower.c
# towupper.c
# vsprintf.c
# wcscat.c
# wcschr.c
# wcscmp.c
# wcscpy.c
# wcscspn.c
# wcslen.c
# wcsncat.c
# wcsncmp.c
# wcsncpy.c
# wcspbrk.c
# wcsrchr.c
# wcsspn.c
# wcsstr.c
# wcstok.c
# wcstol.c
# wcstombs.c
# wcstoul.c
)
if (ARCH MATCHES i386)
list(APPEND SOURCE_NTDLL
# _CIpow.c
# _ftol.c
# _alldiv.c
# _alldvrm.c
# _allmul.c
# _allrem.c
# _allshl.c
# _allshr.c
# _alloca_probe.c
# _aulldiv.c
# _aulldvrm.c
# _aullrem.c
# _aullshr.c
# _chkstk.c
)
elseif (ARCH MATCHES amd64)
list(APPEND SOURCE_NTDLL
# __C_specific_handler
# _setjmp.c
# _setjmpex.c
# _local_unwind.c
# longjmp.c
)
endif()
add_executable(ntdll_crt_apitest testlist.c ${SOURCE_NTDLL})
add_target_compile_definitions(ntdll_crt_apitest _DLL __USE_CRTIMP)
target_link_libraries(ntdll_crt_apitest wine ${PSEH_LIB})
set_module_type(ntdll_crt_apitest win32cui)
add_importlibs(ntdll_crt_apitest ntdll msvcrt_mini kernel32)
add_cd_file(TARGET ntdll_crt_apitest DESTINATION reactos/bin FOR all)

View file

@ -0,0 +1,8 @@
#include <stdio.h>
#include <wine/test.h>
START_TEST(strcpy)
{
}

View file

@ -0,0 +1,21 @@
#define WIN32_LEAN_AND_MEAN
#define __ROS_LONG64__
#include <windows.h>
#define STANDALONE
#include "wine/test.h"
extern void func_strcpy(void);
const struct test winetest_testlist[] =
{
{ "strcpy", func_strcpy },
#if defined(TEST_CRTDLL) || defined(TEST_MSVCRT)
// ...
#elif defined(TEST_MSVCRT)
#elif defined(TEST_NTDLL)
#elif defined(TEST_CRTDLL)
#endif
{ 0, 0 }
};