Re: Is CppUnit un-C++

From: David Hilsee (davidhilseenews_at_yahoo.com)
Date: 09/06/04


Date: Mon, 6 Sep 2004 00:49:25 -0400


"Steven T. Hatton" <susudata@setidava.kushan.aa> wrote in message
news:2pidnfZsMv4C5qfcRVn-sg@speakeasy.net...
> Derrick Coetzee wrote:
>
> > Steven T. Hatton wrote:
> >> If I do use local variables for class types, they require that I
#include
> >> the headers containing their definitions in the header containing the
> >> class I'm
> >> defining. That is, instead of simply forward declaration.
> >
> > Typically, nothing in a header file contains local variables anyway,
> > except inline functions.
>
> In this context it seems clear that /local/ was meant to signify 'class
> local'. That is to say class type used as members of the class being
> defined. I would not have introduced the word 'local' to describe such a
> member, but I believe it is technically correct. Add to the following
that
> a class definition is a class specifier declaration:
<snip>

In my post, I meant that they could be local to testEquality and
testAddition. I think my wording was a bit confusing. At any rate, it
doesn't matter much, because it would also make more sense to have them as
members instead of pointers. IMHO, either way is better. While it is true
that members can cause unnecessary recompilation in certain cases, I doubt
that this will be a big problem for test code. When I want to avoid those
problems, I usually just use the pimpl idiom.

-- 
David Hilsee


Relevant Pages

  • Re: metadata operation failed (8013110E) : Database file is corrupt and may not be usable.
    ... This is an established project that has been compiling for several ... I can only add two more members to my ... tried adding an additional header file with no result. ... >slightly different metadata in two modules for the same type. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: C++ api ?
    ... their members and methods available. ... > input string to int. ... > Well also one has to include the appropriate header file as well!! ...
    (comp.lang.cpp)
  • Events from the WebBrowser control
    ... The MSDN documentation for DWebBrowserEvents2 says that it derives ... when I look at the header file I ... see that DWebBrowserEvents2 derives directly from IDispatch and does not ... add any additional members. ...
    (microsoft.public.inetsdk.programming.webbrowser_ctl)
  • Re: The use of a header file
    ... I want to varify the use of a header file. ... declarations of its members. ... The implementation file consists of the ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Correct way of using Dispose
    ... it's very rare to have members which are unneeded ... > until the rest of the object becomes eligible for garbage collection. ... Local variables allocated on stack - ... to check the topic "Set Unneeded Member Variables to Null Before Making ...
    (microsoft.public.dotnet.general)