Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.Test segfault clang++3.3 macports cmake
From: Richard (legalize+jeeves_at_[hidden])
Date: 2013-07-29 17:38:43


[Please do not mail me a copy of your followup]

boost-users_at_[hidden] spake the secret code
<CA+dwz-3Qem_OD5cLhDN0A0hDX4HOVp6EVak=aUB-OFuRO0WSfg_at_[hidden]> thusly:

>I am getting a segmentation fault when attempting to use Boost.Test.

What version of boost are you using?

>====Foo1.unit_tests.cpp ====
>
>#include "Foo1.hpp"
>#include <string>
>
>#pragma clang diagnostic push
>#pragma clang diagnostic ignored "-Wglobal-constructors"
>
>#include "UseBoostUnitTestFramework.hpp"
>
>BOOST_AUTO_TEST_SUITE(Bar1)
>
>BOOST_AUTO_TEST_CASE(foobar1) {
> BOOST_CHECK_EQUAL(std:string("a"), std::string("a"));
>}
>
>BOOST_AUTO_TEST_CASE(foobar2) {
> BOOST_CHECK_EQUAL(true, true);
>}
>
>BOOST_AUTO_TEST_SUITE_END()
>
>BOOST_AUTO_TEST_SUITE(Bar2)
>
>BOOST_AUTO_TEST_CASE(barfoo1) {
> BOOST_CHECK_EQUAL(1, 1);
>}
>
>BOOST_AUTO_TEST_CASE(barfoo2) {
> BOOST_CHECK_EQUAL(0, 0);
>}
>
>BOOST_AUTO_TEST_SUITE_END()
>
>#pragma clang diagnostic pop

Are all of these test cases/suites necessary to reproduce the crash?

Do you get the crash if you have a single test case and no test suite?

Do you get the crash if you hav ea single test case inside a single suite?

-- 
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
     The Computer Graphics Museum <http://computergraphicsmuseum.org>
         The Terminals Wiki <http://terminals.classiccmp.org>
  Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>

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