comctl32/tests: Add tests for the return values of TreeView_SelectItem in test_select.
Gerald Pfeifer
gerald at pfeifer.com
Fri May 7 14:57:20 CDT 2010
Testing on FreeBSD still passes nicely. (I think those extra tests
may be a bit over the edge, but Nikolay tends to like those. ;-)
Gerald
---
dlls/comctl32/tests/treeview.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/dlls/comctl32/tests/treeview.c b/dlls/comctl32/tests/treeview.c
index 953b54a..848d4ca 100644
--- a/dlls/comctl32/tests/treeview.c
+++ b/dlls/comctl32/tests/treeview.c
@@ -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,
--
1.6.6.2
More information about the wine-patches
mailing list