Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ba644e9c
Commit
ba644e9c
authored
Jul 30, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Fix some tests on Win9x.
parent
24b02960
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
5 deletions
+17
-5
dialog.c
dlls/user32/tests/dialog.c
+9
-4
resource.c
dlls/user32/tests/resource.c
+8
-1
No files found.
dlls/user32/tests/dialog.c
View file @
ba644e9c
...
...
@@ -896,7 +896,8 @@ static void test_GetDlgItemText(void)
ret
=
GetDlgItemTextA
(
NULL
,
0
,
string
,
sizeof
(
string
)
/
sizeof
(
string
[
0
]));
ok
(
!
ret
,
"GetDlgItemText(NULL) shouldn't have succeeded
\n
"
);
ok
(
string
[
0
]
==
'\0'
,
"string retrieved using GetDlgItemText should have been NULL terminated
\n
"
);
ok
(
string
[
0
]
==
'\0'
||
broken
(
!
strcmp
(
string
,
"Overwrite Me"
)),
"string retrieved using GetDlgItemText should have been NULL terminated
\n
"
);
}
static
void
test_DialogBoxParamA
(
void
)
...
...
@@ -906,12 +907,16 @@ static void test_DialogBoxParamA(void)
SetLastError
(
0xdeadbeef
);
ret
=
DialogBoxParamA
(
GetModuleHandle
(
NULL
),
"IDD_DIALOG"
,
hwnd_invalid
,
0
,
0
);
ok
(
0
==
ret
,
"DialogBoxParamA returned %d, expected 0
\n
"
,
ret
);
ok
(
ERROR_INVALID_WINDOW_HANDLE
==
GetLastError
(),
"got %d, expected ERROR_INVALID_WINDOW_HANDLE
\n
"
,
GetLastError
());
ok
(
0
==
ret
||
broken
(
ret
==
-
1
),
"DialogBoxParamA returned %d, expected 0
\n
"
,
ret
);
ok
(
ERROR_INVALID_WINDOW_HANDLE
==
GetLastError
()
||
broken
(
GetLastError
()
==
0xdeadbeef
),
"got %d, expected ERROR_INVALID_WINDOW_HANDLE
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
ret
=
DialogBoxParamA
(
GetModuleHandle
(
NULL
),
"RESOURCE_INVALID"
,
0
,
0
,
0
);
ok
(
-
1
==
ret
,
"DialogBoxParamA returned %d, expected -1
\n
"
,
ret
);
ok
(
ERROR_RESOURCE_NAME_NOT_FOUND
==
GetLastError
(),
"got %d, expected ERROR_RESOURCE_NAME_NOT_FOUND
\n
"
,
GetLastError
());
ok
(
ERROR_RESOURCE_NAME_NOT_FOUND
==
GetLastError
()
||
broken
(
GetLastError
()
==
0xdeadbeef
),
"got %d, expected ERROR_RESOURCE_NAME_NOT_FOUND
\n
"
,
GetLastError
());
}
static
void
test_DisabledDialogTest
(
void
)
...
...
dlls/user32/tests/resource.c
View file @
ba644e9c
...
...
@@ -40,7 +40,13 @@ static void test_LoadStringW(void)
/* Check that the string which is returned by LoadStringW matches
the string at the pointer returned by LoadStringW when called with buflen = 0 */
SetLastError
(
0xdeadbeef
);
length1
=
LoadStringW
(
hInst
,
2
,
(
WCHAR
*
)
&
resourcepointer
,
0
);
/* get pointer to resource. */
if
(
!
length1
&&
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
)
{
win_skip
(
"LoadStringW not implemented
\n
"
);
return
;
}
length2
=
LoadStringW
(
hInst
,
2
,
returnedstringw
,
sizeof
(
returnedstringw
)
/
sizeof
(
WCHAR
));
/* get resource string */
ok
(
length2
>
0
,
"LoadStringW failed to load resource 2, ret %d, err %d
\n
"
,
length2
,
GetLastError
());
ok
(
length1
==
length2
,
"LoadStringW returned different values dependent on buflen. ret1 %d, ret2 %d
\n
"
,
...
...
@@ -114,7 +120,8 @@ static void test_LoadStringA (void)
"LoadString failed: ret %d err %d
\n
"
,
ret
,
GetLastError
());
ret
=
LoadStringA
(
hInst
,
0
,
buf
,
0
);
ok
(
ret
==
-
1
,
"LoadStringA did not return -1 when called with buflen = 0, got %d, err %d
\n
"
,
ok
(
ret
==
-
1
||
broken
(
ret
==
0
),
"LoadStringA did not return -1 when called with buflen = 0, got %d, err %d
\n
"
,
ret
,
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