Boost logo

Boost Users :

Subject: Re: [Boost-users] [unit test] problem inside boost UTF
From: Bruno Belarte (bruno.belarte_at_[hidden])
Date: 2011-04-04 15:45:16


On 04/04/2011 16:58, Steven Watanabe wrote:
> AMDG
>
> On 04/04/2011 07:32 AM, Bruno Belarte wrote:
>> I'm new with boost, and I'm actually experiencing some weird issues...
>>
>> I wrote a class which is basically a wrapper around
>> boost::adjacency_list, and two other nested classes which are wrappers
>> around boost::adjacency_list::vertex_iterator and
>> boost::adjacency_list::out_edge_iterator. I tested theses three classes
>> with the boost unit test framework : everything works fine.
>>
>> Then I wrote a class Tree, which uses boost::shared_/weak_ptr. But when
>> I try to test this class with boost UTF, the test case of the previous
>> graph's out_edge_iterator returns some failures (different depending of
>> the functions from the Tree class called on the test). It's particularly
>> weird considering that these classes share nothing in common except the
>> fact that they use different part of boost.
>>
>> Maybe somebody have a hint on what I am doing wrong !?
>> I used UTF with dynamic lininking, boost1.42 from ubuntu 10.10 package.
>>
>
> Sounds like undefined behavior. You should check that
> you're not using invalid iterators. Other than that
> I'd have to see the code.

Thanks for your quick answer Steven.

I don't think it's undefined behavior (but I may be wrong of course :).
Everything works fine, the program run as I expect when I only test all
the graph stuff.

I attached some code (the makefile is generated by Qt4). As you will
probably see if you compile and execute, a test fails. But if I comment
the tests in TreeTesting.cxx, everything run smoothely, but the previous
error was not related to the commented piece of code.

Bruno

>
> In Christ,
> Steven Watanabe
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users




Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net