Boost logo

Boost :

Subject: Re: [boost] [xint] Third release is ready, requesting preliminary review
From: Jürgen Hunold (juergen.hunold_at_[hidden])
Date: 2010-05-05 02:34:24


On Tuesday, 4. May 2010 17:32:58 you wrote:
> On 05/04/2010 05:51 AM, Jürgen Hunold wrote:
> > And it make things easiser if you only have on "red" entry in the summary
> > page and can just see which test file to look at.
> > And smaller test cases are just current Boost standard.
>
> That works, then. Thanks for satisfying my curiosity.

You're welcome.

> > And I think the patch
> >
> > +#ifdef BOOST_XINT_SINGLE_TEST_PROGRAM
> > + #define BOOST_TEST_DYN_LINK
> > +#else
> > + #define BOOST_TEST_MAIN
> > +#endif
> >
> > is wrong. BOOST_TEST_DYN_LINK should always be defined on the command
> > line when linking against a shared Boost.Test library. So, no source
> > code #define is necessary.
>
> But removing the BOOST_TEST_MAIN from all but one of the files, when
> using a single test program, is.

Yes, BOOST_TEST_MAIN is needed.

#if !defined(BOOST_XINT_SINGLE_TEST_PROGRAM)
    #define BOOST_TEST_MAIN
#endif

is the "correct" solution

> I'm fairly new to Boost.Test, but the documentation gave me the
> impression that you had to make a decision on whether to use dynamic
> linking or not when you wrote the code, because static and dynamic
> linking need slightly different setups. That would suggest that you
> can't easily switch between them, wouldn't it?

Well, I use the same code for static ansd shared linking :-))
You are using AUTO_TEST_CASEs, so there is no problem. All the needed magic is
hidden in BOOST_TEST_MAIN in combination with BOOST_TEST_DYN_LINK.
Using "manual registration" can be tricky.

> > And this issues
> > "
> > test_main.cpp:95:1: warning: "BOOST_TEST_DYN_LINK" redefined
> > <command-line>: warning: this is the location of the previous definition"
> >
> > when compiling a shared library with all Boost.Build magic enabled.
>
> Eh? The library code doesn't use Boost.Test, only the testing code does.
> And even the testing code only includes that #define when
> BOOST_XINT_SINGLE_TEST_PROGRAM is defined, which it should never be
> except on my development machine, or that of someone else doing
> modifications to the library.

That would be me ;-) I've added the single test program locally to get the
errors messages. Adding "BOOST_TEST_DYN_LINK" in source code is potentially
dangerous. It should really be a commandline-option. It should be possible to
set in Code::Blocks.

> > By the way:
> > You have deleted test/Jamroot. Should there be a "test/Jamfile" instead ?
>
> Yes, there should. Did it not make it into Subversion? Checking... it
> appears that it's there, so I'm not sure what to tell you. Maybe check
> it out manually?

No, it is definetely missing.

> > build/Jamfile.v2 still contains "nothrow_random.cpp" which was deleted in
> > 61752 as well.
>
> Sorry, I didn't remember to update that. I would have caught it before a
> final release though, I have an entire checklist of things to do for that.

Good.

> > And I think you may also check in files for other build systems, too.
> > Some libraries have Makefiles as well as visual studio solutions.
>
> I didn't think anyone would care about my Code::Blocks or Visual Studio
> projects. If there's some interest in them, I'll add them in the next
> repository update.

Not really. I've never used Code::Blocks ;-))

Yours,

Jürgen

-- 
* Dipl.-Math. Jürgen Hunold  ! 
* voice: ++49 4257 300       ! Fährstraße 1
* fax  : ++49 4257 300       ! 31609 Balge/Sebbenhausen
* juergen.hunold_at_[hidden]      ! 
-- 
* Dipl.-Math. Jürgen Hunold       ! Ingenieurgesellschaft für 
* voice: ++49 511 262926 57       ! Verkehrs- und Eisenbahnwesen mbH  
* fax  : ++49 511 262926 99       ! Lister Straße 15
* juergen.hunold_at_[hidden]        ! www.ivembh.de
* 
* Geschäftsführer:                ! Sitz des Unternehmens: Hannover
* Prof. Dr.-Ing. Thomas Siefer    ! Amtsgericht Hannover, HRB 56965
* PD Dr.-Ing. Alfons Radtke       !

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk