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
75f6b1d6
Commit
75f6b1d6
authored
Apr 27, 2009
by
Paul Vriens
Committed by
Alexandre Julliard
Apr 28, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32/tests: Fix some test failures on Win9x/WinME.
parent
7e11ecdd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
8 deletions
+27
-8
bitmap.c
dlls/gdi32/tests/bitmap.c
+27
-8
No files found.
dlls/gdi32/tests/bitmap.c
View file @
75f6b1d6
...
...
@@ -1441,6 +1441,13 @@ static void test_GetDIBits(void)
0
,
0
,
0
,
0
,
0xff
,
0xff
,
0
,
0
,
0
,
0
,
0
,
0
,
0xff
,
0xff
,
0
,
0
,
0
,
0
,
0
,
0
,
0xff
,
0xff
,
0
,
0
,
0
,
0
,
0
,
0
,
0xff
,
0xff
,
0
,
0
};
static
const
BYTE
dib_bits_1_9x
[
16
*
4
]
=
{
0
,
0
,
0xaa
,
0xaa
,
0xff
,
0xff
,
0xaa
,
0xaa
,
0
,
0
,
0xaa
,
0xaa
,
0xff
,
0xff
,
0xaa
,
0xaa
,
0
,
0
,
0xaa
,
0xaa
,
0xff
,
0xff
,
0xaa
,
0xaa
,
0
,
0
,
0xaa
,
0xaa
,
0xff
,
0xff
,
0xaa
,
0xaa
,
0
,
0
,
0xaa
,
0xaa
,
0xff
,
0xff
,
0xaa
,
0xaa
,
0
,
0
,
0xaa
,
0xaa
,
0xff
,
0xff
,
0xaa
,
0xaa
,
0
,
0
,
0xaa
,
0xaa
,
0xff
,
0xff
,
0xaa
,
0xaa
,
0
,
0
,
0xaa
,
0xaa
,
0xff
,
0xff
,
0xaa
,
0xaa
};
/* 2-bytes aligned 24-bit bitmap data: 16x16 */
static
const
BYTE
bmp_bits_24
[
16
*
16
*
3
]
=
{
...
...
@@ -1592,15 +1599,21 @@ static void test_GetDIBits(void)
}
/* returned bits are DWORD aligned and upside down */
ok
(
!
memcmp
(
buf
,
dib_bits_1
,
sizeof
(
dib_bits_1
)),
"DIB bits don't match
\n
"
);
ok
(
!
memcmp
(
buf
,
dib_bits_1
,
sizeof
(
dib_bits_1
))
||
broken
(
!
memcmp
(
buf
,
dib_bits_1_9x
,
sizeof
(
dib_bits_1_9x
))),
/* Win9x, WinME */
"DIB bits don't match
\n
"
);
/* Test the palette indices */
memset
(
bi
->
bmiColors
,
0xAA
,
sizeof
(
RGBQUAD
)
*
256
);
SetLastError
(
0xdeadbeef
);
lines
=
GetDIBits
(
hdc
,
hbmp
,
0
,
0
,
NULL
,
bi
,
DIB_PAL_COLORS
);
ok
(((
WORD
*
)
bi
->
bmiColors
)[
0
]
==
0
,
"Color 0 is %d
\n
"
,
((
WORD
*
)
bi
->
bmiColors
)[
0
]);
ok
(((
WORD
*
)
bi
->
bmiColors
)[
1
]
==
1
,
"Color 1 is %d
\n
"
,
((
WORD
*
)
bi
->
bmiColors
)[
1
]);
if
(
lines
==
0
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
)
win_skip
(
"Win9x/WinMe doesn't handle 0 for the number of scan lines
\n
"
);
else
{
ok
(((
WORD
*
)
bi
->
bmiColors
)[
0
]
==
0
,
"Color 0 is %d
\n
"
,
((
WORD
*
)
bi
->
bmiColors
)[
0
]);
ok
(((
WORD
*
)
bi
->
bmiColors
)[
1
]
==
1
,
"Color 1 is %d
\n
"
,
((
WORD
*
)
bi
->
bmiColors
)[
1
]);
}
for
(
i
=
2
;
i
<
256
;
i
++
)
ok
(((
WORD
*
)
bi
->
bmiColors
)[
i
]
==
0xAAAA
,
"Color %d is %d
\n
"
,
i
,
((
WORD
*
)
bi
->
bmiColors
)[
1
]);
...
...
@@ -1708,15 +1721,21 @@ static void test_GetDIBits(void)
/* returned bits are DWORD aligned and upside down */
todo_wine
ok
(
!
memcmp
(
buf
,
dib_bits_1
,
sizeof
(
dib_bits_1
)),
"DIB bits don't match
\n
"
);
ok
(
!
memcmp
(
buf
,
dib_bits_1
,
sizeof
(
dib_bits_1
))
||
broken
(
!
memcmp
(
buf
,
dib_bits_1_9x
,
sizeof
(
dib_bits_1_9x
))),
/* Win9x, WinME */
"DIB bits don't match
\n
"
);
/* Test the palette indices */
memset
(
bi
->
bmiColors
,
0xAA
,
sizeof
(
RGBQUAD
)
*
256
);
SetLastError
(
0xdeadbeef
);
lines
=
GetDIBits
(
hdc
,
hbmp
,
0
,
0
,
NULL
,
bi
,
DIB_PAL_COLORS
);
ok
(((
WORD
*
)
bi
->
bmiColors
)[
0
]
==
0
,
"Color 0 is %d
\n
"
,
((
WORD
*
)
bi
->
bmiColors
)[
0
]);
ok
(((
WORD
*
)
bi
->
bmiColors
)[
1
]
==
1
,
"Color 1 is %d
\n
"
,
((
WORD
*
)
bi
->
bmiColors
)[
1
]);
if
(
lines
==
0
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
)
win_skip
(
"Win9x/WinMe doesn't handle 0 for the number of scan lines
\n
"
);
else
{
ok
(((
WORD
*
)
bi
->
bmiColors
)[
0
]
==
0
,
"Color 0 is %d
\n
"
,
((
WORD
*
)
bi
->
bmiColors
)[
0
]);
ok
(((
WORD
*
)
bi
->
bmiColors
)[
1
]
==
1
,
"Color 1 is %d
\n
"
,
((
WORD
*
)
bi
->
bmiColors
)[
1
]);
}
for
(
i
=
2
;
i
<
256
;
i
++
)
ok
(((
WORD
*
)
bi
->
bmiColors
)[
i
]
==
0xAAAA
,
"Color %d is %d
\n
"
,
i
,
((
WORD
*
)
bi
->
bmiColors
)[
i
]);
...
...
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