Opened 6 years ago

Last modified 6 years ago

#12240 assigned Feature Requests

Documentation for data-driven testing should explictly mention std::tuple

Reported by: Tony Lewis <tonyelewis@…> Owned by: Raffi Enficiaud
Milestone: To Be Determined Component: test
Version: Boost 1.61.0 Severity: Optimization
Keywords: test, tuple, data-driven, BOOST_DATA_TEST_CASE, std::tuple Cc:

Description

BOOST_DATA_TEST_CASE() handles ranges of std::tuples differently to ranges of other types, in that it expects to be able to expand the parts of the tuples out to multiple variables. Whether or not this is intended or just a side-effect of the implementation, I think it's a sensible behaviour. Indeed, it's quite useful to be able to supply BOOST_DATA_TEST_CASE() with pre-zipped data rather than always having to use ^.

However at the moment, this special handling of std::tuple is not documented. Hence I suggest that this be included in the documentation (possibly near the "Zips" section) or otherwise that the implementation is changed so that users' ranges of std::tuples are treated like ranges of other types (ie each tuple is expanded to one variable).

Many thanks for your work on this library.

Change History (2)

comment:1 by Raffi Enficiaud, 6 years ago

Milestone: To Be DeterminedBoost 1.62.0
Owner: changed from Gennadiy Rozental to Raffi Enficiaud
Status: newassigned

Thanks for your feedback.

In fact this is a side effect of the changes made in 1.61, but apparently it is useful to keep it like it is right now (as you are suggesting). So I'll rather go for updating the doc.

comment:2 by Raffi Enficiaud, 6 years ago

Milestone: Boost 1.62.0To Be Determined
Note: See TracTickets for help on using tickets.