2009/12/5 Koen Deforche <[email protected]>:
>> I would also like another tip: to send signals from my test I'm
>> abusing friend class.
>> Can you suggest a better way here too?
>
> What class do you make a friend to what class then ?
> If you can connect() to a signal, you can also emit() that signal ?
>
I apologize for not explaining the context.
I'm trying to make the widgets specific to a particular application domain.
When possible I prefer to add unit tests that cover a class within the
same, so I can have full access to the hidden objects from the
interface of the widget.
Lately I've been using increasingly WStackedWidget as a state machine
where each state is represented by a widget stack.
To quickly test the logic of these state machines I'm using directly
BOOST_AUTO_TEST_CASE (mytest) {...} and adding class mytest as friend
of the widgets in the WStackedWidget.
This solution works, but its lack of elegance suggests to me some
doubts about the maintainability and proliferation of friends.
I was wondering if from your experience you could suggest some other
way, I do not see that at the time, to maintain encapsulation and
allow the tests to interact with several widget objects.
------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest