- 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
oldstable
Michael Stefaniuc 2004-09-28 19:17:43 +00:00 committed by Alexandre Julliard
parent 847c81df89
commit fd306fb5d1
2 changed files with 6 additions and 1 deletions

View File

@ -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;
}

View File

@ -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");