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
9707a2de
Commit
9707a2de
authored
Apr 05, 2007
by
Paul Vriens
Committed by
Alexandre Julliard
Apr 05, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Don't run unicode tests if not supported.
parent
f5678a4d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
4 deletions
+37
-4
menu.c
dlls/user32/tests/menu.c
+37
-4
No files found.
dlls/user32/tests/menu.c
View file @
9707a2de
...
@@ -526,6 +526,7 @@ static void test_menu_add_string( void )
...
@@ -526,6 +526,7 @@ static void test_menu_add_string( void )
HMENU
hmenu
;
HMENU
hmenu
;
MENUITEMINFO
info
;
MENUITEMINFO
info
;
BOOL
rc
;
BOOL
rc
;
int
ret
;
char
string
[
0x80
];
char
string
[
0x80
];
char
string2
[
0x80
];
char
string2
[
0x80
];
...
@@ -571,8 +572,15 @@ static void test_menu_add_string( void )
...
@@ -571,8 +572,15 @@ static void test_menu_add_string( void )
ok
(
GetMenuString
(
hmenu
,
0
,
strback
,
99
,
MF_BYPOSITION
),
"GetMenuString on ownerdraw entry failed
\n
"
);
ok
(
GetMenuString
(
hmenu
,
0
,
strback
,
99
,
MF_BYPOSITION
),
"GetMenuString on ownerdraw entry failed
\n
"
);
ok
(
!
strcmp
(
strback
,
"Dummy string"
),
"Menu text from Ansi version incorrect
\n
"
);
ok
(
!
strcmp
(
strback
,
"Dummy string"
),
"Menu text from Ansi version incorrect
\n
"
);
ok
(
GetMenuStringW
(
hmenu
,
0
,
(
WCHAR
*
)
strbackW
,
99
,
MF_BYPOSITION
),
"GetMenuStringW on ownerdraw entry failed
\n
"
);
SetLastError
(
0xdeadbeef
);
ret
=
GetMenuStringW
(
hmenu
,
0
,
(
WCHAR
*
)
strbackW
,
99
,
MF_BYPOSITION
);
if
(
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
)
skip
(
"GetMenuStringW is not implemented
\n
"
);
else
{
ok
(
ret
,
"GetMenuStringW on ownerdraw entry failed
\n
"
);
ok
(
!
lstrcmpW
(
strbackW
,
expectedString
),
"Menu text from Unicode version incorrect
\n
"
);
ok
(
!
lstrcmpW
(
strbackW
,
expectedString
),
"Menu text from Unicode version incorrect
\n
"
);
}
/* Just change ftype to string and see what text is stored */
/* Just change ftype to string and see what text is stored */
memset
(
&
info
,
0x00
,
sizeof
(
info
));
memset
(
&
info
,
0x00
,
sizeof
(
info
));
...
@@ -627,9 +635,12 @@ static void test_menu_add_string( void )
...
@@ -627,9 +635,12 @@ static void test_menu_add_string( void )
ok
(
rc
,
"InsertMenuItem failed
\n
"
);
ok
(
rc
,
"InsertMenuItem failed
\n
"
);
ok
(
!
GetMenuString
(
hmenu
,
0
,
NULL
,
0
,
MF_BYPOSITION
),
ok
(
!
GetMenuString
(
hmenu
,
0
,
NULL
,
0
,
MF_BYPOSITION
),
"GetMenuString on ownerdraw entry succeeded.
\n
"
);
"GetMenuString on ownerdraw entry succeeded.
\n
"
);
ok
(
!
GetMenuStringW
(
hmenu
,
0
,
NULL
,
0
,
MF_BYPOSITION
),
SetLastError
(
0xdeadbeef
);
"GetMenuStringW on ownerdraw entry succeeded.
\n
"
);
ret
=
GetMenuStringW
(
hmenu
,
0
,
NULL
,
0
,
MF_BYPOSITION
);
if
(
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
)
skip
(
"GetMenuStringW is not implemented
\n
"
);
else
ok
(
!
ret
,
"GetMenuStringW on ownerdraw entry succeeded.
\n
"
);
DestroyMenu
(
hmenu
);
DestroyMenu
(
hmenu
);
}
}
...
@@ -681,6 +692,11 @@ static WCHAR *strcpyW( WCHAR *dst, const WCHAR *src )
...
@@ -681,6 +692,11 @@ static WCHAR *strcpyW( WCHAR *dst, const WCHAR *src )
else strcpyW( (WCHAR*)string, (WCHAR*)init);\
else strcpyW( (WCHAR*)string, (WCHAR*)init);\
if( ansi) ret = InsertMenuItemA(hmenu, 0, TRUE, &info1 );\
if( ansi) ret = InsertMenuItemA(hmenu, 0, TRUE, &info1 );\
else ret = InsertMenuItemW(hmenu, 0, TRUE, (MENUITEMINFOW*)&info1 );\
else ret = InsertMenuItemW(hmenu, 0, TRUE, (MENUITEMINFOW*)&info1 );\
if( GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)\
{\
skip("InsertMenuItem%s not implemented\n", ansi ? "A" : "W");\
break;\
}\
if( !(eret1)) { ok( (eret1)==ret,"InsertMenuItem should have failed.\n");\
if( !(eret1)) { ok( (eret1)==ret,"InsertMenuItem should have failed.\n");\
stop = TRUE;\
stop = TRUE;\
} else ok( (eret1)==ret,"InsertMenuItem failed, err %d\n",GetLastError());\
} else ok( (eret1)==ret,"InsertMenuItem failed, err %d\n",GetLastError());\
...
@@ -697,8 +713,14 @@ static WCHAR *strcpyW( WCHAR *dst, const WCHAR *src )
...
@@ -697,8 +713,14 @@ static WCHAR *strcpyW( WCHAR *dst, const WCHAR *src )
MENUITEMINFOA *einfo = &einfoA;\
MENUITEMINFOA *einfo = &einfoA;\
MENUITEMINFOW *info2W = (MENUITEMINFOW *)&info2A;\
MENUITEMINFOW *info2W = (MENUITEMINFOW *)&info2A;\
if( !stop) {\
if( !stop) {\
SetLastError( 0xdeadbeef);\
ret = ansi ? GetMenuItemInfoA( hmenu, 0, TRUE, info2 ) :\
ret = ansi ? GetMenuItemInfoA( hmenu, 0, TRUE, info2 ) :\
GetMenuItemInfoW( hmenu, 0, TRUE, info2W );\
GetMenuItemInfoW( hmenu, 0, TRUE, info2W );\
if( GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)\
{\
skip("GetMenuItemInfo%s not implemented\n", ansi ? "A" : "W");\
break;\
}\
if( !(eret2)) ok( (eret2)==ret,"GetMenuItemInfo should have failed.\n");\
if( !(eret2)) ok( (eret2)==ret,"GetMenuItemInfo should have failed.\n");\
else { \
else { \
ok( (eret2)==ret,"GetMenuItemInfo failed, err %d\n",GetLastError());\
ok( (eret2)==ret,"GetMenuItemInfo failed, err %d\n",GetLastError());\
...
@@ -730,8 +752,14 @@ submenu = CreateMenu();\
...
@@ -730,8 +752,14 @@ submenu = CreateMenu();\
/* modify menu */
/* modify menu */
#define TMII_MODM( flags, id, data, eret )\
#define TMII_MODM( flags, id, data, eret )\
if( !stop) {\
if( !stop) {\
SetLastError( 0xdeadbeef);\
if(ansi)ret = ModifyMenuA( hmenu, 0, flags, (UINT_PTR)id, (char*)data);\
if(ansi)ret = ModifyMenuA( hmenu, 0, flags, (UINT_PTR)id, (char*)data);\
else ret = ModifyMenuW( hmenu, 0, flags, (UINT_PTR)id, (WCHAR*)data);\
else ret = ModifyMenuW( hmenu, 0, flags, (UINT_PTR)id, (WCHAR*)data);\
if( GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)\
{\
skip("ModifyMenu%s not implemented\n", ansi ? "A" : "W");\
break;\
}\
if( !(eret)) ok( (eret)==ret,"ModifyMenuA should have failed.\n");\
if( !(eret)) ok( (eret)==ret,"ModifyMenuA should have failed.\n");\
else ok( (eret)==ret,"ModifyMenuA failed, err %d\n",GetLastError());\
else ok( (eret)==ret,"ModifyMenuA failed, err %d\n",GetLastError());\
}
}
...
@@ -746,6 +774,11 @@ if( !stop) {\
...
@@ -746,6 +774,11 @@ if( !stop) {\
else strcpyW( (WCHAR*)string, (WCHAR*)init);\
else strcpyW( (WCHAR*)string, (WCHAR*)init);\
if( ansi) ret = SetMenuItemInfoA(hmenu, 0, TRUE, &info1 );\
if( ansi) ret = SetMenuItemInfoA(hmenu, 0, TRUE, &info1 );\
else ret = SetMenuItemInfoW(hmenu, 0, TRUE, (MENUITEMINFOW*)&info1 );\
else ret = SetMenuItemInfoW(hmenu, 0, TRUE, (MENUITEMINFOW*)&info1 );\
if( GetLastError() == ERROR_CALL_NOT_IMPLEMENTED)\
{\
skip("SetMenuItemInfo%s not implemented\n", ansi ? "A" : "W");\
break;\
}\
if( !(eret1)) { ok( (eret1)==ret,"InsertMenuItem should have failed.\n");\
if( !(eret1)) { ok( (eret1)==ret,"InsertMenuItem should have failed.\n");\
stop = TRUE;\
stop = TRUE;\
} else ok( (eret1)==ret,"InsertMenuItem failed, err %d\n",GetLastError());\
} else ok( (eret1)==ret,"InsertMenuItem failed, err %d\n",GetLastError());\
...
...
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