Re: Merged "treemodel-fix" branch



On Mon, 22 Aug 2011 22:30 +0200, "Kristian Rietveld" <kris gtk org>
wrote:
> Having an automatic tester for generic GtkTreeModels to test for
> conformance is still something I would love to have and have been
> thinking about before. It would be a module in which you plug your own
> implementation of GtkTreeModel to have it tested.  I was wondering on
> how this would look like -- but I guess it could be something like
> "gtk_tree_model_auto_test_new_with_model(GtkTreeModel*)".  Second, I
> think an interface is needed to tell the auto tester how to add/remove
> rows in the custom model, since GtkTreeModel only deals with read
> access.
> 
> I will think some more about it.

I think that's the wrong approach. I have to admit I only have read
tests but I don't think many of my models would be compatible with the
test suite deciding which rows to delete. Would it not be possible to do
something like:

auto=gtk_tree_model_auto_test_new_with_model(model);
do_something_which_will_cause_model_to_change();
gtk_tree_model_auto_verify(auto);
do_something_else_which_will_cause_model_to_change();
gtk_tree_model_auto_verify(auto);

perhaps with some advice in the documentation about what kind of changes
would make good tests.

Cheers,

Ali.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]