Commit 3ff0890c authored by Gerald Pfeifer's avatar Gerald Pfeifer Committed by Alexandre Julliard

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

parent cbbfbca9
......@@ -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,
......
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