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
9f12d226
Commit
9f12d226
authored
Dec 15, 2003
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 15, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Global|Local]ReAlloc don't fail with size 0.
Fixed typos.
parent
7d7ce505
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
heap.c
dlls/kernel/tests/heap.c
+17
-7
No files found.
dlls/kernel/tests/heap.c
View file @
9f12d226
...
...
@@ -46,8 +46,13 @@ START_TEST(heap)
ok
(
gbl
!=
NULL
,
"Can't realloc global memory"
);
size
=
GlobalSize
(
gbl
);
ok
(
size
>=
10
&&
size
<=
16
,
"Memory not resized to size 10, instead size=%ld"
,
size
);
gbl
=
GlobalReAlloc
(
gbl
,
0
,
GMEM_MOVEABLE
);
ok
(
gbl
==
NULL
,
"GlobalReAlloc should fail on size 0, instead size=%ld"
,
size
);
todo_wine
{
gbl
=
GlobalReAlloc
(
gbl
,
0
,
GMEM_MOVEABLE
);
ok
(
gbl
!=
NULL
,
"GlobalReAlloc should not fail on size 0"
);
}
size
=
GlobalSize
(
gbl
);
ok
(
size
==
0
,
"Memory not resized to size 0, instead size=%ld"
,
size
);
ok
(
GlobalFree
(
gbl
)
==
NULL
,
"Memory not freed"
);
...
...
@@ -59,14 +64,19 @@ START_TEST(heap)
/* Local*() functions */
gbl
=
LocalAlloc
(
GMEM_MOVEABLE
,
0
);
ok
(
gbl
!=
NULL
,
"
glob
al memory not allocated for size 0"
);
ok
(
gbl
!=
NULL
,
"
loc
al memory not allocated for size 0"
);
gbl
=
LocalReAlloc
(
gbl
,
10
,
GMEM_MOVEABLE
);
ok
(
gbl
!=
NULL
,
"Can't realloc
glob
al memory"
);
ok
(
gbl
!=
NULL
,
"Can't realloc
loc
al memory"
);
size
=
LocalSize
(
gbl
);
ok
(
size
>=
10
&&
size
<=
16
,
"Memory not resized to size 10, instead size=%ld"
,
size
);
gbl
=
LocalReAlloc
(
gbl
,
0
,
GMEM_MOVEABLE
);
ok
(
gbl
==
NULL
,
"LocalReAlloc should fail on size 0, instead size=%ld"
,
size
);
todo_wine
{
gbl
=
LocalReAlloc
(
gbl
,
0
,
GMEM_MOVEABLE
);
ok
(
gbl
!=
NULL
,
"LocalReAlloc should not fail on size 0"
);
}
size
=
LocalSize
(
gbl
);
ok
(
size
==
0
,
"Memory not resized to size 0, instead size=%ld"
,
size
);
ok
(
LocalFree
(
gbl
)
==
NULL
,
"Memory not freed"
);
...
...
@@ -74,6 +84,6 @@ START_TEST(heap)
ok
(
size
==
0
,
"Memory should have been freed, size=%ld"
,
size
);
gbl
=
LocalReAlloc
(
0
,
10
,
GMEM_MOVEABLE
);
ok
(
gbl
==
NULL
,
"
glob
al realloc allocated memory"
);
ok
(
gbl
==
NULL
,
"
loc
al realloc allocated memory"
);
}
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