Modify

Opened 3 months ago

Closed 3 months ago

#13443 closed Bugs (fixed)

boost.test data driven test fails to compile when number of samples greater than 9

Reported by: g.sermaidis@… Owned by: Raffi Enficiaud
Milestone: Boost 1.67.0 Component: test
Version: Boost 1.66.0 Severity: Problem
Keywords: test; data driven; arity Cc:

Description

Hello, It looks like boost.test fails to compile a simple data driven test with 10 samples. I am using clang++ (Apple LLVM version 9.0.0 (clang-900.0.39.2))with C++14 flags enabled. According to this help page <http://www.boost.org/doc/libs/1_66_0/libs/test/doc/html/boost_test/utf_reference/test_org_reference/test_org_boost_test_dataset.html> the compiler should have no problem dealing with number of samples greater than BOOST_TEST_DATASET_MAX_ARITY which is 10 by default. Even defining BOOST_TEST_DATASET_MAX_ARITY to 20 prior to including any headers still fails to compile with the following error: /usr/local/include/boost/test/data/test_case.hpp:182: error: no matching function for call to 'bind'

boost::bind( &TestCase::template test_method<Arg...>,

Here is the relevant code:

#define BOOST_TEST_MODULE dataset_example68 
#define BOOST_TEST_DYN_LINK 
#include <boost/test/unit_test.hpp> 
#include <boost/test/data/test_case.hpp> 
#include <boost/test/data/monomorphic.hpp> 
#include <sstream> 
namespace bdata = boost::unit_test::data; 
BOOST_DATA_TEST_CASE( 
test1, 
bdata::make( { 1, 2, 3, 5 } ) ^ 
bdata::make( { 1, 2, 3, 5 } ) ^ 
bdata::make( { 1, 2, 3, 5 } ) ^ 
bdata::make( { 1, 2, 3, 5 } ) ^ 
bdata::make( { 1, 2, 3, 5 } ) ^ 
bdata::make( { 1, 2, 3, 5 } ) ^ 
bdata::make( { 1, 2, 3, 5 } ) ^ 
bdata::make( { 1, 2, 3, 5 } ) ^ 
bdata::make( { 1, 2, 3, 5 } ) ^ 
bdata::make( { 1, 2, 3, 5 } ), 
sample1, sample2, sample3, sample4, sample5, sample6, sample7, sample8, sample9, sample10) 
{} 

Thank you!

Attachments (0)

Change History (5)

comment:1 Changed 3 months ago by Raffi Enficiaud

Would it be possible to check a fix, from the branch local/check-std-bind ? Thanks!

comment:2 Changed 3 months ago by Raffi Enficiaud

Owner: changed from Gennadiy Rozental to Raffi Enficiaud
Status: newassigned

comment:3 Changed 3 months ago by g.sermaidis@…

Just did, compiles cleanly! Thank you

comment:4 Changed 3 months ago by Raffi Enficiaud

Milestone: To Be DeterminedBoost 1.67.0

In develop

comment:5 Changed 3 months ago by Raffi Enficiaud

Resolution: fixed
Status: assignedclosed

In master

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Raffi Enficiaud.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.