Added more tests

This commit is contained in:
rods 1998-07-06 19:34:50 +00:00
parent 34d246ef41
commit 2e4e8f8ced

View File

@ -319,7 +319,20 @@ void multiListSelfTest(FILE * fd, char * aTitle, nsIListBox * listBox) {
multi->SelectItem(inxs[i]);
}*/
multi->SetSelectedIndices(inxs, 3);
fprintf(fd, "\nTesting Iselecting items 0,2,4\n");fflush(fd);
fprintf(fd, "\nTesting selecting items 0,2,4\n");fflush(fd);
char * item0 = "Multi List Item 0";
nsString selItem;
multi->GetSelectedItem(selItem);
selStr = selItem.ToNewCString();
fprintf(fd, "\nTesting GetSelectedItem\n\t is [%s] should be [%s] Test: [%s]\n",
selStr, item0, eval(!strcmp(selStr, item0))); fflush(fd);
if (nsnull != selStr) delete selStr;
i = multi->GetSelectedIndex();
fprintf(fd, "\nTesting GetSelectedIndex\n\t is [%d] should be [%d] Test: [%s]\n",
i, 0, eval(i == 0)); fflush(fd);
int status = 1;
count = multi->GetSelectedCount();