At 1:25 AM -0400 8/23/05, Gennadiy Rozental wrote:
[...]
The existing unit_test main() function is then changed to call a user substitutable function which is required to call unit_test_main().
That is a major drawback - we couldn't rely on user concience.
As I described things, the default (i.e. if the user doesn't provide a substitute) would just call unit_test_main, so that the right thing happens if the user does nothing in this area. It doesn't seem unreasonable to me to require that if a user *does* provide a substitute, that this substitute must call unit_test_main, i.e. make that part of the substitution contract. On the other hand, your global fixture approach looks fine too, and is probably easier to document. So I'd say go with that.