Commit fd306fb5 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

- native ImageList_Remove dosn't spit out an error message when

deleting an index out of range so don't do that either - add 2 ImageList_Remove tests
parent 847c81df
......@@ -2052,7 +2052,7 @@ ImageList_Remove (HIMAGELIST himl, INT i)
}
if ((i < -1) || (i >= himl->cCurImage)) {
ERR("index out of range! %d\n", i);
TRACE("index out of range! %d\n", i);
return FALSE;
}
......
......@@ -130,12 +130,17 @@ static BOOL DoTest1(void)
/* remove when nothing exists */
ok(!ImageList_Remove(himl,0),"removed non-existent icon\n");
/* removing everything from an empty imagelist should succeed */
ok(ImageList_RemoveAll(himl),"removed non-existent icon\n");
/* add three */
ok(0==ImageList_AddIcon(himl, hicon1),"failed to add icon1\n");
ok(1==ImageList_AddIcon(himl, hicon2),"failed to add icon2\n");
ok(2==ImageList_AddIcon(himl, hicon3),"failed to add icon3\n");
/* remove an index out of range */
ok(!ImageList_Remove(himl,4711),"removed non-existent icon\n");
/* remove three */
ok(ImageList_Remove(himl,0),"can't remove 0\n");
ok(ImageList_Remove(himl,0),"can't remove 0\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment