Re: unit testing C++ code from perl



I owe Noel a review. Naturally, he used my TEST() macro (which I got from
CppUnitLite), but it doesn't have the ability to inherit suites, hence to
setUp or tearDown.

My bad - I didn't see TEST_FIXTURE() yet. The system appears to use a
fixture's constructor and destructor as setUp and tearDown, which has a
few reasons to be the correct idiom in C++.

Someone suggested I post this to their mailing list. I will if my search
for one more specific technical problem succeeds.

Nope - they passed my test. The equivalent of setUp() and tearDown() call
just before the test case runs. A more naive implementation of the TEST()
macro would call them before and after main().

--
Phlip
http://c2.com/cgi/wiki?ZeekLand <-- NOT a blog!!!


.



Relevant Pages

  • Re: Is it possible for a try...finally...end construct to fail?
    ... Setup; ... MethodWhichMightFail; ... TearDown; ... finally execute. ...
    (borland.public.delphi.language.objectpascal)
  • Re: Art of Unit Testing
    ... However, the fact that this is *generally* the best way doesn't exclude the fact that there are *exceptions* when it makes sense to setUp and tearDown not for every test, e.g. when it is absolutely sure that the fixture cannot be destroyed by the individual tests or when creating the fixture takes too much time. ... According to the "extreme programming" paradigm, testing should be done several times a day. ... If the testing needs too much time, people are discouraged to test often. ...
    (comp.lang.python)
  • Re: How to load new class definitions at runtime?
    ... > 1) No module level code. ... > version - the return value from Teardown gets passed to the new module's ... > Setup function). ...
    (comp.lang.python)
  • Re: Per suite unit test setup and teardown
    ... Ron Fox wrote: ... service which I can use setup() and teardown() to control. ...
    (comp.lang.ruby)
  • Re: search or filter method using lastname,firstname,middle
    ... Private Sub cboGoto_AfterUpdate ... > Basically the users would start at a combo box in my form and use a comma ... > tab to the fields but I want to setup the ability to forgo that method. ...
    (microsoft.public.access.forms)