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
92b467cd
Commit
92b467cd
authored
Jun 20, 2011
by
Huw Davies
Committed by
Alexandre Julliard
Jun 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32/tests: Add broken behaviour for nt4 sp3.
parent
6e673e1e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
52 deletions
+56
-52
bitmap.c
dlls/gdi32/tests/bitmap.c
+56
-52
No files found.
dlls/gdi32/tests/bitmap.c
View file @
92b467cd
...
...
@@ -1787,61 +1787,65 @@ static void test_GetDIBits_BI_BITFIELDS(void)
ok
(
ret
==
1
,
"GetDIBits failed
\n
"
);
if
(
dibinfo
->
bmiHeader
.
biBitCount
>
8
)
{
ok
(
dibinfo
->
bmiHeader
.
biCompression
==
BI_BITFIELDS
,
ok
(
dibinfo
->
bmiHeader
.
biCompression
==
BI_BITFIELDS
||
broken
(
dibinfo
->
bmiHeader
.
biCompression
==
BI_RGB
),
/* nt4 sp3 */
"compression is %u (%d bpp)
\n
"
,
dibinfo
->
bmiHeader
.
biCompression
,
dibinfo
->
bmiHeader
.
biBitCount
);
ok
(
!
bitmasks
[
0
],
"red mask is set
\n
"
);
ok
(
!
bitmasks
[
1
],
"green mask is set
\n
"
);
ok
(
!
bitmasks
[
2
],
"blue mask is set
\n
"
);
/* test with NULL bits pointer and correct bpp */
dibinfo
->
bmiHeader
.
biSizeImage
=
0xdeadbeef
;
ret
=
GetDIBits
(
hdc
,
hbm
,
0
,
1
,
NULL
,
dibinfo
,
DIB_RGB_COLORS
);
ok
(
ret
==
1
,
"GetDIBits failed
\n
"
);
ok
(
bitmasks
[
0
]
!=
0
,
"red mask is not set
\n
"
);
ok
(
bitmasks
[
1
]
!=
0
,
"green mask is not set
\n
"
);
ok
(
bitmasks
[
2
]
!=
0
,
"blue mask is not set
\n
"
);
ok
(
dibinfo
->
bmiHeader
.
biSizeImage
!=
0xdeadbeef
,
"size image not set
\n
"
);
/* test with valid bits pointer */
memset
(
dibinfo
,
0
,
sizeof
(
dibinfo_buf
));
dibinfo
->
bmiHeader
.
biSize
=
sizeof
(
BITMAPINFOHEADER
);
ret
=
GetDIBits
(
hdc
,
hbm
,
0
,
1
,
NULL
,
dibinfo
,
DIB_RGB_COLORS
);
ok
(
ret
==
1
,
"GetDIBits failed ret %u err %u
\n
"
,
ret
,
GetLastError
());
dibinfo
->
bmiHeader
.
biSizeImage
=
0xdeadbeef
;
ret
=
GetDIBits
(
hdc
,
hbm
,
0
,
1
,
bits
,
dibinfo
,
DIB_RGB_COLORS
);
ok
(
ret
==
1
,
"GetDIBits failed ret %u err %u
\n
"
,
ret
,
GetLastError
());
ok
(
bitmasks
[
0
]
!=
0
,
"red mask is not set
\n
"
);
ok
(
bitmasks
[
1
]
!=
0
,
"green mask is not set
\n
"
);
ok
(
bitmasks
[
2
]
!=
0
,
"blue mask is not set
\n
"
);
ok
(
dibinfo
->
bmiHeader
.
biSizeImage
!=
0xdeadbeef
,
"size image not set
\n
"
);
/* now with bits and 0 lines */
memset
(
dibinfo
,
0
,
sizeof
(
dibinfo_buf
));
dibinfo
->
bmiHeader
.
biSize
=
sizeof
(
BITMAPINFOHEADER
);
dibinfo
->
bmiHeader
.
biSizeImage
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
ret
=
GetDIBits
(
hdc
,
hbm
,
0
,
0
,
bits
,
dibinfo
,
DIB_RGB_COLORS
);
ok
(
ret
==
1
,
"GetDIBits failed ret %u err %u
\n
"
,
ret
,
GetLastError
());
ok
(
!
bitmasks
[
0
],
"red mask is set
\n
"
);
ok
(
!
bitmasks
[
1
],
"green mask is set
\n
"
);
ok
(
!
bitmasks
[
2
],
"blue mask is set
\n
"
);
ok
(
dibinfo
->
bmiHeader
.
biSizeImage
!=
0xdeadbeef
,
"size image not set
\n
"
);
memset
(
bitmasks
,
0
,
3
*
sizeof
(
DWORD
));
dibinfo
->
bmiHeader
.
biSizeImage
=
0xdeadbeef
;
ret
=
GetDIBits
(
hdc
,
hbm
,
0
,
0
,
bits
,
dibinfo
,
DIB_RGB_COLORS
);
ok
(
ret
==
1
,
"GetDIBits failed ret %u err %u
\n
"
,
ret
,
GetLastError
());
ok
(
bitmasks
[
0
]
!=
0
,
"red mask is not set
\n
"
);
ok
(
bitmasks
[
1
]
!=
0
,
"green mask is not set
\n
"
);
ok
(
bitmasks
[
2
]
!=
0
,
"blue mask is not set
\n
"
);
ok
(
dibinfo
->
bmiHeader
.
biSizeImage
!=
0xdeadbeef
,
"size image not set
\n
"
);
if
(
dibinfo
->
bmiHeader
.
biCompression
==
BI_BITFIELDS
)
{
ok
(
!
bitmasks
[
0
],
"red mask is set
\n
"
);
ok
(
!
bitmasks
[
1
],
"green mask is set
\n
"
);
ok
(
!
bitmasks
[
2
],
"blue mask is set
\n
"
);
/* test with NULL bits pointer and correct bpp */
dibinfo
->
bmiHeader
.
biSizeImage
=
0xdeadbeef
;
ret
=
GetDIBits
(
hdc
,
hbm
,
0
,
1
,
NULL
,
dibinfo
,
DIB_RGB_COLORS
);
ok
(
ret
==
1
,
"GetDIBits failed
\n
"
);
ok
(
bitmasks
[
0
]
!=
0
,
"red mask is not set
\n
"
);
ok
(
bitmasks
[
1
]
!=
0
,
"green mask is not set
\n
"
);
ok
(
bitmasks
[
2
]
!=
0
,
"blue mask is not set
\n
"
);
ok
(
dibinfo
->
bmiHeader
.
biSizeImage
!=
0xdeadbeef
,
"size image not set
\n
"
);
/* test with valid bits pointer */
memset
(
dibinfo
,
0
,
sizeof
(
dibinfo_buf
));
dibinfo
->
bmiHeader
.
biSize
=
sizeof
(
BITMAPINFOHEADER
);
ret
=
GetDIBits
(
hdc
,
hbm
,
0
,
1
,
NULL
,
dibinfo
,
DIB_RGB_COLORS
);
ok
(
ret
==
1
,
"GetDIBits failed ret %u err %u
\n
"
,
ret
,
GetLastError
());
dibinfo
->
bmiHeader
.
biSizeImage
=
0xdeadbeef
;
ret
=
GetDIBits
(
hdc
,
hbm
,
0
,
1
,
bits
,
dibinfo
,
DIB_RGB_COLORS
);
ok
(
ret
==
1
,
"GetDIBits failed ret %u err %u
\n
"
,
ret
,
GetLastError
());
ok
(
bitmasks
[
0
]
!=
0
,
"red mask is not set
\n
"
);
ok
(
bitmasks
[
1
]
!=
0
,
"green mask is not set
\n
"
);
ok
(
bitmasks
[
2
]
!=
0
,
"blue mask is not set
\n
"
);
ok
(
dibinfo
->
bmiHeader
.
biSizeImage
!=
0xdeadbeef
,
"size image not set
\n
"
);
/* now with bits and 0 lines */
memset
(
dibinfo
,
0
,
sizeof
(
dibinfo_buf
));
dibinfo
->
bmiHeader
.
biSize
=
sizeof
(
BITMAPINFOHEADER
);
dibinfo
->
bmiHeader
.
biSizeImage
=
0xdeadbeef
;
SetLastError
(
0xdeadbeef
);
ret
=
GetDIBits
(
hdc
,
hbm
,
0
,
0
,
bits
,
dibinfo
,
DIB_RGB_COLORS
);
ok
(
ret
==
1
,
"GetDIBits failed ret %u err %u
\n
"
,
ret
,
GetLastError
());
ok
(
!
bitmasks
[
0
],
"red mask is set
\n
"
);
ok
(
!
bitmasks
[
1
],
"green mask is set
\n
"
);
ok
(
!
bitmasks
[
2
],
"blue mask is set
\n
"
);
ok
(
dibinfo
->
bmiHeader
.
biSizeImage
!=
0xdeadbeef
,
"size image not set
\n
"
);
memset
(
bitmasks
,
0
,
3
*
sizeof
(
DWORD
));
dibinfo
->
bmiHeader
.
biSizeImage
=
0xdeadbeef
;
ret
=
GetDIBits
(
hdc
,
hbm
,
0
,
0
,
bits
,
dibinfo
,
DIB_RGB_COLORS
);
ok
(
ret
==
1
,
"GetDIBits failed ret %u err %u
\n
"
,
ret
,
GetLastError
());
ok
(
bitmasks
[
0
]
!=
0
,
"red mask is not set
\n
"
);
ok
(
bitmasks
[
1
]
!=
0
,
"green mask is not set
\n
"
);
ok
(
bitmasks
[
2
]
!=
0
,
"blue mask is not set
\n
"
);
ok
(
dibinfo
->
bmiHeader
.
biSizeImage
!=
0xdeadbeef
,
"size image not set
\n
"
);
}
}
else
skip
(
"
not in 16 bpp BI_BITFIELDS mode, skipping that test
\n
"
);
else
skip
(
"
bitmap in colortable mode, skipping BI_BITFIELDS tests
\n
"
);
DeleteObject
(
hbm
);
...
...
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