mirror of
https://github.com/reactos/reactos.git
synced 2025-07-30 09:52:14 +00:00
[SCRRUN_WINETEST] Sync with Wine Staging 4.0. CORE-15682
This commit is contained in:
parent
9d4f1f05a3
commit
c3b5406849
2 changed files with 21 additions and 18 deletions
|
@ -18,6 +18,9 @@
|
|||
*/
|
||||
|
||||
#define COBJMACROS
|
||||
#ifdef __REACTOS__
|
||||
#define CONST_VTABLE
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
|
||||
#include "windows.h"
|
||||
|
@ -251,13 +254,13 @@ static ULONG WINAPI test_unk_Release(IUnknown *iface)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static /* const */ IUnknownVtbl test_unk_vtbl = {
|
||||
static const IUnknownVtbl test_unk_vtbl = {
|
||||
test_unk_QI,
|
||||
test_unk_AddRef,
|
||||
test_unk_Release
|
||||
};
|
||||
|
||||
static /* const */ IUnknownVtbl test_unk_no_vtbl = {
|
||||
static const IUnknownVtbl test_unk_no_vtbl = {
|
||||
test_unk_no_QI,
|
||||
test_unk_AddRef,
|
||||
test_unk_Release
|
||||
|
@ -312,7 +315,7 @@ static HRESULT WINAPI test_disp_Invoke(IDispatch *iface, DISPID dispid, REFIID r
|
|||
return E_NOTIMPL;
|
||||
}
|
||||
|
||||
static /* const */ IDispatchVtbl test_disp_vtbl = {
|
||||
static const IDispatchVtbl test_disp_vtbl = {
|
||||
test_disp_QI,
|
||||
test_disp_AddRef,
|
||||
test_disp_Release,
|
||||
|
@ -368,7 +371,7 @@ static void test_hash_value(void)
|
|||
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
|
||||
ok(V_I4(&hash) == 0, "got %d\n", V_I4(&hash));
|
||||
|
||||
for (i = 0; i < sizeof(str_hash_tests)/sizeof(str_hash_tests[0]); i++) {
|
||||
for (i = 0; i < ARRAY_SIZE(str_hash_tests); i++) {
|
||||
expected = get_str_hash(str_hash_tests[i], BinaryCompare);
|
||||
|
||||
hr = IDictionary_put_CompareMode(dict, BinaryCompare);
|
||||
|
@ -461,7 +464,7 @@ static void test_hash_value(void)
|
|||
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
|
||||
ok(V_I4(&hash) == ~0u, "got hash 0x%08x\n", V_I4(&hash));
|
||||
|
||||
for (i = 0; i < sizeof(int_hash_tests)/sizeof(int_hash_tests[0]); i++) {
|
||||
for (i = 0; i < ARRAY_SIZE(int_hash_tests); i++) {
|
||||
SHORT i2;
|
||||
BYTE ui1;
|
||||
LONG i4;
|
||||
|
@ -597,7 +600,7 @@ static void test_hash_value(void)
|
|||
ok(V_VT(&hash) == VT_I4, "got %d\n", V_VT(&hash));
|
||||
ok(V_I4(&hash) == 0, "got hash 0x%08x\n", V_I4(&hash));
|
||||
|
||||
for (i = 0; i < sizeof(float_hash_tests)/sizeof(float_hash_tests[0]); i++) {
|
||||
for (i = 0; i < ARRAY_SIZE(float_hash_tests); i++) {
|
||||
double dbl;
|
||||
FLOAT flt;
|
||||
DATE date;
|
||||
|
|
|
@ -375,7 +375,7 @@ static void test_GetFileVersion(void)
|
|||
BSTR path, version;
|
||||
HRESULT hr;
|
||||
|
||||
GetSystemDirectoryW(pathW, sizeof(pathW)/sizeof(WCHAR));
|
||||
GetSystemDirectoryW(pathW, ARRAY_SIZE(pathW));
|
||||
|
||||
lstrcpyW(filenameW, pathW);
|
||||
lstrcatW(filenameW, k32W);
|
||||
|
@ -438,7 +438,7 @@ static void test_GetParentFolderName(void)
|
|||
hr = IFileSystem3_GetParentFolderName(fs3, NULL, NULL);
|
||||
ok(hr == E_POINTER, "GetParentFolderName returned %x, expected E_POINTER\n", hr);
|
||||
|
||||
for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
|
||||
for(i=0; i < ARRAY_SIZE(tests); i++) {
|
||||
result = (BSTR)0xdeadbeef;
|
||||
path = tests[i].path ? SysAllocString(tests[i].path) : NULL;
|
||||
hr = IFileSystem3_GetParentFolderName(fs3, path, &result);
|
||||
|
@ -481,7 +481,7 @@ static void test_GetFileName(void)
|
|||
hr = IFileSystem3_GetFileName(fs3, NULL, NULL);
|
||||
ok(hr == E_POINTER, "GetFileName returned %x, expected E_POINTER\n", hr);
|
||||
|
||||
for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
|
||||
for(i=0; i < ARRAY_SIZE(tests); i++) {
|
||||
result = (BSTR)0xdeadbeef;
|
||||
path = tests[i].path ? SysAllocString(tests[i].path) : NULL;
|
||||
hr = IFileSystem3_GetFileName(fs3, path, &result);
|
||||
|
@ -527,7 +527,7 @@ static void test_GetBaseName(void)
|
|||
hr = IFileSystem3_GetBaseName(fs3, NULL, NULL);
|
||||
ok(hr == E_POINTER, "GetBaseName returned %x, expected E_POINTER\n", hr);
|
||||
|
||||
for(i=0; i<sizeof(tests)/sizeof(tests[0]); i++) {
|
||||
for(i=0; i < ARRAY_SIZE(tests); i++) {
|
||||
result = (BSTR)0xdeadbeef;
|
||||
path = tests[i].path ? SysAllocString(tests[i].path) : NULL;
|
||||
hr = IFileSystem3_GetBaseName(fs3, path, &result);
|
||||
|
@ -1521,7 +1521,7 @@ static void test_CreateTextFile(void)
|
|||
/* File was created in Unicode mode, it contains 0xfffe BOM. Opening it in non-Unicode mode
|
||||
treats BOM like a valuable data with appropriate CP_ACP -> WCHAR conversion. */
|
||||
buffW[0] = 0;
|
||||
MultiByteToWideChar(CP_ACP, 0, utf16bom, -1, buffW, sizeof(buffW)/sizeof(WCHAR));
|
||||
MultiByteToWideChar(CP_ACP, 0, utf16bom, -1, buffW, ARRAY_SIZE(buffW));
|
||||
|
||||
hr = IFileSystem3_OpenTextFile(fs3, nameW, ForReading, VARIANT_FALSE, TristateFalse, &stream);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
@ -1569,7 +1569,7 @@ static void test_WriteLine(void)
|
|||
ret = ReadFile(file, buffA, sizeof(buffA), &r, NULL);
|
||||
ok(ret && r, "read %d, got %d, %d\n", r, ret, GetLastError());
|
||||
|
||||
len = MultiByteToWideChar(CP_ACP, 0, buffA, r, buffW, sizeof(buffW)/sizeof(WCHAR));
|
||||
len = MultiByteToWideChar(CP_ACP, 0, buffA, r, buffW, ARRAY_SIZE(buffW));
|
||||
buffW[len] = 0;
|
||||
lstrcpyW(buff2W, nameW);
|
||||
lstrcatW(buff2W, crlfW);
|
||||
|
@ -1655,7 +1655,7 @@ static void test_ReadAll(void)
|
|||
hr = ITextStream_ReadAll(stream, &str);
|
||||
ok(hr == S_FALSE || broken(hr == S_OK) /* win2k */, "got 0x%08x\n", hr);
|
||||
buffW[0] = 0;
|
||||
MultiByteToWideChar(CP_ACP, 0, utf16bom, -1, buffW, sizeof(buffW)/sizeof(WCHAR));
|
||||
MultiByteToWideChar(CP_ACP, 0, utf16bom, -1, buffW, ARRAY_SIZE(buffW));
|
||||
ok(str[0] == buffW[0] && str[1] == buffW[1], "got %s, %d\n", wine_dbgstr_w(str), SysStringLen(str));
|
||||
SysFreeString(str);
|
||||
ITextStream_Release(stream);
|
||||
|
@ -1801,7 +1801,7 @@ static void test_Read(void)
|
|||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
|
||||
buffW[0] = 0;
|
||||
MultiByteToWideChar(CP_ACP, 0, utf16bom, -1, buffW, sizeof(buffW)/sizeof(WCHAR));
|
||||
MultiByteToWideChar(CP_ACP, 0, utf16bom, -1, buffW, ARRAY_SIZE(buffW));
|
||||
|
||||
ok(!lstrcmpW(str, buffW), "got %s, expected %s\n", wine_dbgstr_w(str), wine_dbgstr_w(buffW));
|
||||
ok(SysStringLen(str) == 2, "got %d\n", SysStringLen(str));
|
||||
|
@ -2151,7 +2151,7 @@ static void test_GetExtensionName(void)
|
|||
HRESULT hr;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < sizeof(extension_tests)/sizeof(extension_tests[0]); i++) {
|
||||
for (i = 0; i < ARRAY_SIZE(extension_tests); i++) {
|
||||
|
||||
path = SysAllocString(extension_tests[i].path);
|
||||
ext = NULL;
|
||||
|
@ -2190,7 +2190,7 @@ static void test_GetSpecialFolder(void)
|
|||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
hr = IFolder_get_Path(folder, &path);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
GetWindowsDirectoryW(pathW, sizeof(pathW)/sizeof(WCHAR));
|
||||
GetWindowsDirectoryW(pathW, ARRAY_SIZE(pathW));
|
||||
ok(!lstrcmpiW(pathW, path), "got %s, expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(pathW));
|
||||
SysFreeString(path);
|
||||
IFolder_Release(folder);
|
||||
|
@ -2199,7 +2199,7 @@ static void test_GetSpecialFolder(void)
|
|||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
hr = IFolder_get_Path(folder, &path);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
GetSystemDirectoryW(pathW, sizeof(pathW)/sizeof(WCHAR));
|
||||
GetSystemDirectoryW(pathW, ARRAY_SIZE(pathW));
|
||||
ok(!lstrcmpiW(pathW, path), "got %s, expected %s\n", wine_dbgstr_w(path), wine_dbgstr_w(pathW));
|
||||
SysFreeString(path);
|
||||
IFolder_Release(folder);
|
||||
|
@ -2208,7 +2208,7 @@ static void test_GetSpecialFolder(void)
|
|||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
hr = IFolder_get_Path(folder, &path);
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ret = GetTempPathW(sizeof(pathW)/sizeof(WCHAR), pathW);
|
||||
ret = GetTempPathW(ARRAY_SIZE(pathW), pathW);
|
||||
if (ret && pathW[ret-1] == '\\')
|
||||
pathW[ret-1] = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue