Displaying 3 results from an estimated 3 matches for "do_control_with_items_assert".
2006 Nov 21
0
[744] trunk/wxruby2: get_data support & mem mgmt to all ControlWithItems types, using more
...Unit::TestCase
+ def assert_retrievable_data(ctrl, n, test_value)
+ compare = Marshal.load( Marshal.dump(test_value) )
+ ctrl.set_client_data(n, test_value)
+ assert_equal(compare, ctrl.get_client_data(n) )
+ GC.start
+ assert_equal(compare, ctrl.get_client_data(n) )
+ end
+
+ def do_control_with_items_assertions(f)
+ assert_retrievable_data(f.control, 0, { ''b'' => ''B'' })
+ assert_retrievable_data(f.control, 1, ''string item data'')
+ assert_retrievable_data(f.control, 2, 42.3)
+ end
+
+ def test_treectrl_itemdata
+ f = CtrlContainerFra...
2006 Dec 01
0
[767] trunk/wxruby2: Added CheckListBox to item_data test, note to explain why fixes are not needed
...6-12-01 17:40:06 UTC (rev 766)
+++ trunk/wxruby2/tests/test_item_data.rb        2006-12-01 17:42:15 UTC (rev 767)
</span><span class="lines">@@ -105,6 +105,13 @@
</span><span class="cx"> do_control_with_items_assertions(f)
</span><span class="cx"> f.close(true)
</span><span class="cx"> end
</span><ins>+
+ def test_checklistbox_itemdata
+ f = CtrlContainerFrame.new(Wx::CheckListBox, Wx::DEFAULT_POSITION,
+ Wx::D...
2006 Dec 01
0
[766] trunk/wxruby2: Added item_data aliases for client_data functions, update doc & tests;
.../span><del>- assert_equal(compare, ctrl.get_client_data(n) )
</del><ins>+ assert_equal(compare, ctrl.get_item_data(n) )
</ins><span class="cx"> end
</span><span class="cx">
</span><span class="cx"> def do_control_with_items_assertions(f)
</span><span class="lines">@@ -34,21 +34,26 @@
</span><span class="cx">
</span><span class="cx"> def test_treectrl_itemdata
</span><span class="cx"> f = CtrlContainerFrame.new(Wx::TreeCtrl)
</sp...