comctl32/tests: Add tests for the return values of TreeView_SelectItem in test_select.

This commit is contained in:
Gerald Pfeifer 2010-05-07 21:57:20 +02:00 committed by Alexandre Julliard
parent cbbfbca9e4
commit 3ff0890c11
1 changed files with 13 additions and 0 deletions

View File

@ -388,17 +388,23 @@ static void test_select(void)
/* root-none select tests */
flush_sequences(MsgSequences, NUM_MSG_SEQUENCES);
r = TreeView_SelectItem(hTree, NULL);
expect(TRUE, r);
Clear();
AddItem('1');
r = TreeView_SelectItem(hTree, hRoot);
expect(TRUE, r);
AddItem('2');
r = TreeView_SelectItem(hTree, hRoot);
expect(TRUE, r);
AddItem('3');
r = TreeView_SelectItem(hTree, NULL);
expect(TRUE, r);
AddItem('4');
r = TreeView_SelectItem(hTree, NULL);
expect(TRUE, r);
AddItem('5');
r = TreeView_SelectItem(hTree, hRoot);
expect(TRUE, r);
AddItem('.');
ok(!strcmp(sequence, "1(nR)nR23(Rn)Rn45(nR)nR."), "root-none select test\n");
ok_sequence(MsgSequences, TREEVIEW_SEQ_INDEX, rootnone_select_seq,
@ -407,17 +413,24 @@ static void test_select(void)
/* root-child select tests */
flush_sequences(MsgSequences, NUM_MSG_SEQUENCES);
r = TreeView_SelectItem(hTree, NULL);
expect(TRUE, r);
Clear();
AddItem('1');
r = TreeView_SelectItem(hTree, hRoot);
expect(TRUE, r);
AddItem('2');
r = TreeView_SelectItem(hTree, hRoot);
expect(TRUE, r);
AddItem('3');
r = TreeView_SelectItem(hTree, hChild);
expect(TRUE, r);
AddItem('4');
r = TreeView_SelectItem(hTree, hChild);
expect(TRUE, r);
AddItem('5');
r = TreeView_SelectItem(hTree, hRoot);
expect(TRUE, r);
AddItem('.');
ok(!strcmp(sequence, "1(nR)nR23(RC)RC45(CR)CR."), "root-child select test\n");
ok_sequence(MsgSequences, TREEVIEW_SEQ_INDEX, rootchild_select_seq,