Module: wine Branch: master Commit: 532f57a243f442825c7c3ca56136c18757d3bf28 URL: http://source.winehq.org/git/wine.git/?a=commit;h=532f57a243f442825c7c3ca561...
Author: Louis Lenders xerox_xerox2000@yahoo.co.uk Date: Fri Nov 24 19:25:20 2006 +0000
crypt32: Add test for I_CryptInstallOssGlobal.
---
dlls/crypt32/tests/main.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/dlls/crypt32/tests/main.c b/dlls/crypt32/tests/main.c index ef2463e..73ead4a 100644 --- a/dlls/crypt32/tests/main.c +++ b/dlls/crypt32/tests/main.c @@ -343,6 +343,24 @@ static void test_getDefaultCryptProv(voi CryptReleaseContext(prov, 0); }
+typedef int (WINAPI *I_CryptInstallOssGlobal)(DWORD,DWORD,DWORD); + +static void test_CryptInstallOssGlobal(void) +{ + int ret,i; + I_CryptInstallOssGlobal pI_CryptInstallOssGlobal; + + if (!hCrypt) return; + + pI_CryptInstallOssGlobal= (I_CryptInstallOssGlobal)GetProcAddress(hCrypt,"I_CryptInstallOssGlobal"); + /* passing in some random values to I_CryptInstallOssGlobal, it always returns 9 the first time, then 10, 11 etc.*/ + for(i=0;i<30;i++) + { + ret = pI_CryptInstallOssGlobal(rand(),rand(),rand()); + ok((9+i) == ret,"Expected %d, got %d\n",(9+i),ret); + } +} + START_TEST(main) { hCrypt = LoadLibraryA("crypt32.dll"); @@ -354,4 +372,5 @@ START_TEST(main) test_cryptTls(); test_readTrustedPublisherDWORD(); test_getDefaultCryptProv(); + test_CryptInstallOssGlobal(); }