Re: [Cppunit-devel] Re: RE: Integrating CppUnit Windows edition...
Brought to you by:
blep
|
From: Baptiste L. <bl...@cl...> - 2001-04-22 14:24:32
|
> Hmm, I guess you need a macro for that. But it's only to save you from
typing
> 'testMethod' twice, not very exciting.
Yes, but you're assured that the name is the correct one (I usally don't
look the location but the class/method which are in the test name.). I guess
I'll try it both way when I have time and decide if the macros are worth it.
> Well, I guess the 'industrial strength' way is to use a text based
testrunner
> on the nightly build and automatically mail the test failures to the
respective
> maintainers of the code.
Hmm, from what I understand of XP, the code is never integrated unless
all tests pass and they should be quick to run (since you refactor &
integrate often).
Plus there should not be code ownership. Of course, this does not apply if
you use cppunit with other "method". The process you depict would work well
in the context of open source project, I think.
> But for manual runs, I'd put a breakpoint in constructor of Exception()
and
> navigate up a few stack frames when it gets hit by a failed test. Doesn't
> really matter if you use a graphical test runner or not.
Yes I thought of that too. I tried to do that using an C assert, and
have a setting to decide weither or not an exception is thrown, but since
the library is linked to each component (the exe, the testrunner dll, and
your other dll), the setting would apply only to the current component. In
the end, I'll try to see if the add-ins could add or remove the
break-point).
> The reasons why I let Java start the test program and not the other way
around
> is that C++ doesn't have a portable method of spawning new processes: *nix
has
> fork() but Win32 uses something else.
Hmm that only make two differents way. Wouldn't be to hard to handle
both (strategy?). How do you get to use the break-point trick ? With VC++,
you need attach the debugger to the process first, then chase down the
Exception source and set the breakpoint. The bad part is attching the
debugger (you can't to a macro that do that).
---
Baptiste Lepilleur <gai...@fr...> http://gaiacrtn.free.fr/index.html
Author of The Text Reformatter, a tool for fanfiction readers and writers.
Language: English, French (Well, I'm French).
|