Boost logo

Boost Users :

Subject: [Boost-users] Boost.Test change between 1.56 and 1.64
From: Dominique Devienne (ddevienne_at_[hidden])
Date: 2017-07-25 17:09:02


1.56

class BOOST_TEST_DECL test_tree_visitor {
public:
    // test tree visitor interface
    virtual void visit( test_case const& ) {}
    virtual bool test_suite_start( test_suite const& ) { return true; }
    virtual void test_suite_finish( test_suite const& ) {}

protected:
    BOOST_TEST_PROTECTED_VIRTUAL ~test_tree_visitor() {}
};

1.64

class BOOST_TEST_DECL test_tree_visitor {
public:
    // test tree visitor interface
    virtual bool visit( test_unit const& ) { return true; }
    virtual void visit( test_case const& tc ) { visit(
(test_unit const&)tc ); }
    virtual bool test_suite_start( test_suite const& ts ){ return visit(
(test_unit const&)ts ); }
    virtual void test_suite_finish( test_suite const& ) {}

protected:
    BOOST_TEST_PROTECTED_VIRTUAL ~test_tree_visitor() {}
};

To list test suites and test cases of our test exes, I implemented a custom
visitor in Boost 1.56 and simply did

        const auto& master_ts = but::framework::master_test_suite();
        but::traverse_test_tree(master_ts, visitor);

This is broken in 1.64, none of the old methods from the visitor are
called, and thus no suites or cases are discovered. Two out of 3 of the old
methods are forwards to the new visit() method,
and obviously the implementation only calls the new visit(). The forwarding
should be in the other direction for backward-compatibility.

Looking for visit/visitor in
http://www.boost.org/doc/libs/1_64_0/libs/test/doc/html/boost_test/change_log.html
yield nothing.

Can someone please shed some light on this incompatible change? Thanks, --DD



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