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
cae277f1
Commit
cae277f1
authored
Aug 08, 2007
by
Evan Stade
Committed by
Alexandre Julliard
Aug 09, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdiplus/tests: Added GdipCreateBitmapFromScan0 test.
parent
c147389f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
0 deletions
+84
-0
Makefile.in
dlls/gdiplus/tests/Makefile.in
+1
-0
image.c
dlls/gdiplus/tests/image.c
+83
-0
No files found.
dlls/gdiplus/tests/Makefile.in
View file @
cae277f1
...
...
@@ -9,6 +9,7 @@ CTESTS = \
brush.c
\
graphics.c
\
graphicspath.c
\
image.c
\
matrix.c
\
pen.c
...
...
dlls/gdiplus/tests/image.c
0 → 100644
View file @
cae277f1
/*
* Unit test suite for images
*
* Copyright (C) 2007 Google (Evan Stade)
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "windows.h"
#include "gdiplus.h"
#include "wine/test.h"
#define expect(expected, got) ok(((UINT)got) == ((UINT)expected), "Expected %.8x, got %.8x\n", (UINT)expected, (UINT)got)
static
void
test_Scan0
()
{
GpBitmap
*
bm
;
GpStatus
stat
;
BYTE
buff
[
360
];
bm
=
NULL
;
stat
=
GdipCreateBitmapFromScan0
(
10
,
10
,
10
,
PixelFormat24bppRGB
,
NULL
,
&
bm
);
todo_wine
{
expect
(
Ok
,
stat
);
ok
(
NULL
!=
bm
,
"Expected bitmap to be initialized
\n
"
);
}
GdipDisposeImage
((
GpImage
*
)
bm
);
bm
=
(
GpBitmap
*
)
0xdeadbeef
;
stat
=
GdipCreateBitmapFromScan0
(
10
,
-
10
,
10
,
PixelFormat24bppRGB
,
NULL
,
&
bm
);
expect
(
InvalidParameter
,
stat
);
todo_wine
expect
(
NULL
,
bm
);
bm
=
(
GpBitmap
*
)
0xdeadbeef
;
stat
=
GdipCreateBitmapFromScan0
(
-
10
,
10
,
10
,
PixelFormat24bppRGB
,
NULL
,
&
bm
);
expect
(
InvalidParameter
,
stat
);
todo_wine
expect
(
NULL
,
bm
);
bm
=
(
GpBitmap
*
)
0xdeadbeef
;
stat
=
GdipCreateBitmapFromScan0
(
10
,
0
,
10
,
PixelFormat24bppRGB
,
NULL
,
&
bm
);
expect
(
InvalidParameter
,
stat
);
todo_wine
expect
(
NULL
,
bm
);
bm
=
NULL
;
stat
=
GdipCreateBitmapFromScan0
(
10
,
10
,
12
,
PixelFormat24bppRGB
,
buff
,
&
bm
);
expect
(
Ok
,
stat
);
ok
(
NULL
!=
bm
,
"Expected bitmap to be initialized
\n
"
);
GdipDisposeImage
((
GpImage
*
)
bm
);
bm
=
(
GpBitmap
*
)
0xdeadbeef
;
stat
=
GdipCreateBitmapFromScan0
(
10
,
10
,
10
,
PixelFormat24bppRGB
,
buff
,
&
bm
);
todo_wine
{
expect
(
InvalidParameter
,
stat
);
expect
(
NULL
,
bm
);
}
bm
=
(
GpBitmap
*
)
0xdeadbeef
;
stat
=
GdipCreateBitmapFromScan0
(
10
,
10
,
0
,
PixelFormat24bppRGB
,
buff
,
&
bm
);
todo_wine
{
expect
(
InvalidParameter
,
stat
);
expect
(
0xdeadbeef
,
bm
);
}
}
START_TEST
(
image
)
{
test_Scan0
();
}
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