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
0edae1c9
Commit
0edae1c9
authored
Jan 26, 2008
by
Reece H. Dunn
Committed by
Alexandre Julliard
Feb 06, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cabinet: Make the fdi tests pass on Vista.
parent
6d59ddf6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
26 deletions
+47
-26
fdi.c
dlls/cabinet/tests/fdi.c
+47
-26
No files found.
dlls/cabinet/tests/fdi.c
View file @
0edae1c9
...
...
@@ -92,10 +92,6 @@ static void test_FDICreate(void)
HFDI
hfdi
;
ERF
erf
;
erf
.
erfOper
=
0xcafefeed
;
erf
.
erfType
=
0xdeadbabe
;
erf
.
fError
=
0xdecaface
;
/* native crashes if pfnalloc is NULL */
/* FDICreate does not crash with a NULL pfnfree,
...
...
@@ -104,6 +100,9 @@ static void test_FDICreate(void)
if
(
0
)
{
SetLastError
(
0xdeadbeef
);
erf
.
erfOper
=
0xcafefeed
;
erf
.
erfType
=
0xdeadbabe
;
erf
.
fError
=
0xdecaface
;
hfdi
=
FDICreate
(
fdi_alloc
,
NULL
,
fdi_open
,
fdi_read
,
fdi_write
,
fdi_close
,
fdi_seek
,
cpuUNKNOWN
,
&
erf
);
...
...
@@ -118,99 +117,121 @@ static void test_FDICreate(void)
}
SetLastError
(
0xdeadbeef
);
erf
.
erfOper
=
0xcafefeed
;
erf
.
erfType
=
0xdeadbabe
;
erf
.
fError
=
0xdecaface
;
hfdi
=
FDICreate
(
fdi_alloc
,
fdi_free
,
NULL
,
fdi_read
,
fdi_write
,
fdi_close
,
fdi_seek
,
cpuUNKNOWN
,
&
erf
);
ok
(
hfdi
!=
NULL
,
"Expected non-NULL context
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
ok
(
erf
.
erfOper
==
0xcafefeed
,
"Expected 0xcafefeed
, got %d
\n
"
,
erf
.
erfOper
);
ok
(
erf
.
erfType
==
0xdeadbabe
,
"Expected 0xdeadbabe
, got %d
\n
"
,
erf
.
erfType
);
ok
(
erf
.
fError
==
0xdecaface
,
"Expected 0xdecaface
, got %d
\n
"
,
erf
.
fError
);
ok
(
(
erf
.
erfOper
==
0xcafefeed
||
erf
.
erfOper
==
0
/* Vista */
),
"Expected 0xcafefeed or 0
, got %d
\n
"
,
erf
.
erfOper
);
ok
(
(
erf
.
erfType
==
0xdeadbabe
||
erf
.
erfType
==
0
/* Vista */
),
"Expected 0xdeadbabe or 0
, got %d
\n
"
,
erf
.
erfType
);
ok
(
(
erf
.
fError
==
0xdecaface
||
erf
.
fError
==
0
/* Vista */
),
"Expected 0xdecaface or 0
, got %d
\n
"
,
erf
.
fError
);
FDIDestroy
(
hfdi
);
SetLastError
(
0xdeadbeef
);
erf
.
erfOper
=
0xcafefeed
;
erf
.
erfType
=
0xdeadbabe
;
erf
.
fError
=
0xdecaface
;
hfdi
=
FDICreate
(
fdi_alloc
,
fdi_free
,
fdi_open
,
NULL
,
fdi_write
,
fdi_close
,
fdi_seek
,
cpuUNKNOWN
,
&
erf
);
ok
(
hfdi
!=
NULL
,
"Expected non-NULL context
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
ok
(
erf
.
erfOper
==
0xcafefeed
,
"Expected 0xcafefeed
, got %d
\n
"
,
erf
.
erfOper
);
ok
(
erf
.
erfType
==
0xdeadbabe
,
"Expected 0xdeadbabe
, got %d
\n
"
,
erf
.
erfType
);
ok
(
erf
.
fError
==
0xdecaface
,
"Expected 0xdecaface
, got %d
\n
"
,
erf
.
fError
);
ok
(
(
erf
.
erfOper
==
0xcafefeed
||
erf
.
erfOper
==
0
/* Vista */
),
"Expected 0xcafefeed or 0
, got %d
\n
"
,
erf
.
erfOper
);
ok
(
(
erf
.
erfType
==
0xdeadbabe
||
erf
.
erfType
==
0
/* Vista */
),
"Expected 0xdeadbabe or 0
, got %d
\n
"
,
erf
.
erfType
);
ok
(
(
erf
.
fError
==
0xdecaface
||
erf
.
fError
==
0
/* Vista */
),
"Expected 0xdecaface or 0
, got %d
\n
"
,
erf
.
fError
);
FDIDestroy
(
hfdi
);
SetLastError
(
0xdeadbeef
);
erf
.
erfOper
=
0xcafefeed
;
erf
.
erfType
=
0xdeadbabe
;
erf
.
fError
=
0xdecaface
;
hfdi
=
FDICreate
(
fdi_alloc
,
fdi_free
,
fdi_open
,
fdi_read
,
NULL
,
fdi_close
,
fdi_seek
,
cpuUNKNOWN
,
&
erf
);
ok
(
hfdi
!=
NULL
,
"Expected non-NULL context
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
ok
(
erf
.
erfOper
==
0xcafefeed
,
"Expected 0xcafefeed
, got %d
\n
"
,
erf
.
erfOper
);
ok
(
erf
.
erfType
==
0xdeadbabe
,
"Expected 0xdeadbabe
, got %d
\n
"
,
erf
.
erfType
);
ok
(
erf
.
fError
==
0xdecaface
,
"Expected 0xdecaface
, got %d
\n
"
,
erf
.
fError
);
ok
(
(
erf
.
erfOper
==
0xcafefeed
||
erf
.
erfOper
==
0
/* Vista */
),
"Expected 0xcafefeed or 0
, got %d
\n
"
,
erf
.
erfOper
);
ok
(
(
erf
.
erfType
==
0xdeadbabe
||
erf
.
erfType
==
0
/* Vista */
),
"Expected 0xdeadbabe or 0
, got %d
\n
"
,
erf
.
erfType
);
ok
(
(
erf
.
fError
==
0xdecaface
||
erf
.
fError
==
0
/* Vista */
),
"Expected 0xdecaface or 0
, got %d
\n
"
,
erf
.
fError
);
FDIDestroy
(
hfdi
);
SetLastError
(
0xdeadbeef
);
erf
.
erfOper
=
0xcafefeed
;
erf
.
erfType
=
0xdeadbabe
;
erf
.
fError
=
0xdecaface
;
hfdi
=
FDICreate
(
fdi_alloc
,
fdi_free
,
fdi_open
,
fdi_read
,
fdi_write
,
NULL
,
fdi_seek
,
cpuUNKNOWN
,
&
erf
);
ok
(
hfdi
!=
NULL
,
"Expected non-NULL context
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
ok
(
erf
.
erfOper
==
0xcafefeed
,
"Expected 0xcafefeed
, got %d
\n
"
,
erf
.
erfOper
);
ok
(
erf
.
erfType
==
0xdeadbabe
,
"Expected 0xdeadbabe
, got %d
\n
"
,
erf
.
erfType
);
ok
(
erf
.
fError
==
0xdecaface
,
"Expected 0xdecaface
, got %d
\n
"
,
erf
.
fError
);
ok
(
(
erf
.
erfOper
==
0xcafefeed
||
erf
.
erfOper
==
0
/* Vista */
),
"Expected 0xcafefeed or 0
, got %d
\n
"
,
erf
.
erfOper
);
ok
(
(
erf
.
erfType
==
0xdeadbabe
||
erf
.
erfType
==
0
/* Vista */
),
"Expected 0xdeadbabe or 0
, got %d
\n
"
,
erf
.
erfType
);
ok
(
(
erf
.
fError
==
0xdecaface
||
erf
.
fError
==
0
/* Vista */
),
"Expected 0xdecaface or 0
, got %d
\n
"
,
erf
.
fError
);
FDIDestroy
(
hfdi
);
SetLastError
(
0xdeadbeef
);
erf
.
erfOper
=
0xcafefeed
;
erf
.
erfType
=
0xdeadbabe
;
erf
.
fError
=
0xdecaface
;
hfdi
=
FDICreate
(
fdi_alloc
,
fdi_free
,
fdi_open
,
fdi_read
,
fdi_write
,
fdi_close
,
NULL
,
cpuUNKNOWN
,
&
erf
);
ok
(
hfdi
!=
NULL
,
"Expected non-NULL context
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
ok
(
erf
.
erfOper
==
0xcafefeed
,
"Expected 0xcafefeed
, got %d
\n
"
,
erf
.
erfOper
);
ok
(
erf
.
erfType
==
0xdeadbabe
,
"Expected 0xdeadbabe
, got %d
\n
"
,
erf
.
erfType
);
ok
(
erf
.
fError
==
0xdecaface
,
"Expected 0xdecaface
, got %d
\n
"
,
erf
.
fError
);
ok
(
(
erf
.
erfOper
==
0xcafefeed
||
erf
.
erfOper
==
0
/* Vista */
),
"Expected 0xcafefeed or 0
, got %d
\n
"
,
erf
.
erfOper
);
ok
(
(
erf
.
erfType
==
0xdeadbabe
||
erf
.
erfType
==
0
/* Vista */
),
"Expected 0xdeadbabe or 0
, got %d
\n
"
,
erf
.
erfType
);
ok
(
(
erf
.
fError
==
0xdecaface
||
erf
.
fError
==
0
/* Vista */
),
"Expected 0xdecaface or 0
, got %d
\n
"
,
erf
.
fError
);
FDIDestroy
(
hfdi
);
SetLastError
(
0xdeadbeef
);
erf
.
erfOper
=
0xcafefeed
;
erf
.
erfType
=
0xdeadbabe
;
erf
.
fError
=
0xdecaface
;
hfdi
=
FDICreate
(
fdi_alloc
,
fdi_free
,
fdi_open
,
fdi_read
,
fdi_write
,
fdi_close
,
fdi_seek
,
cpuUNKNOWN
,
NULL
);
ok
(
hfdi
!=
NULL
,
"Expected non-NULL context
\n
"
);
/* XP sets hfdi to a non-NULL value, but Vista sets it to NULL! */
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
ok
(
erf
.
erfOper
==
0xcafefeed
,
"Expected 0xcafefeed, got %d
\n
"
,
erf
.
erfOper
);
ok
(
erf
.
erfType
==
0xdeadbabe
,
"Expected 0xdeadbabe, got %d
\n
"
,
erf
.
erfType
);
ok
(
erf
.
fError
==
0xdecaface
,
"Expected 0xdecaface, got %d
\n
"
,
erf
.
fError
);
/* NULL is passed to FDICreate instead of &erf, so don't retest the erf member values. */
FDIDestroy
(
hfdi
);
/* bad cpu type */
SetLastError
(
0xdeadbeef
);
erf
.
erfOper
=
0xcafefeed
;
erf
.
erfType
=
0xdeadbabe
;
erf
.
fError
=
0xdecaface
;
hfdi
=
FDICreate
(
fdi_alloc
,
fdi_free
,
fdi_open
,
fdi_read
,
fdi_write
,
fdi_close
,
fdi_seek
,
0xcafebabe
,
&
erf
);
ok
(
hfdi
!=
NULL
,
"Expected non-NULL context
\n
"
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected 0xdeadbeef, got %d
\n
"
,
GetLastError
());
ok
(
erf
.
erfOper
==
0xcafefeed
,
"Expected 0xcafefeed
, got %d
\n
"
,
erf
.
erfOper
);
ok
(
erf
.
erfType
==
0xdeadbabe
,
"Expected 0xdeadbabe
, got %d
\n
"
,
erf
.
erfType
);
ok
(
erf
.
fError
==
0xdecaface
,
"Expected 0xdecaface
, got %d
\n
"
,
erf
.
fError
);
ok
(
(
erf
.
erfOper
==
0xcafefeed
||
erf
.
erfOper
==
0
/* Vista */
),
"Expected 0xcafefeed or 0
, got %d
\n
"
,
erf
.
erfOper
);
ok
(
(
erf
.
erfType
==
0xdeadbabe
||
erf
.
erfType
==
0
/* Vista */
),
"Expected 0xdeadbabe or 0
, got %d
\n
"
,
erf
.
erfType
);
ok
(
(
erf
.
fError
==
0xdecaface
||
erf
.
fError
==
0
/* Vista */
),
"Expected 0xdecaface or 0
, got %d
\n
"
,
erf
.
fError
);
FDIDestroy
(
hfdi
);
/* pfnalloc fails */
SetLastError
(
0xdeadbeef
);
erf
.
erfOper
=
0xcafefeed
;
erf
.
erfType
=
0xdeadbabe
;
erf
.
fError
=
0xdecaface
;
hfdi
=
FDICreate
(
fdi_alloc_bad
,
fdi_free
,
fdi_open
,
fdi_read
,
fdi_write
,
fdi_close
,
fdi_seek
,
cpuUNKNOWN
,
&
erf
);
...
...
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