Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[snippet_dataset1_3] seems to be broken #176

green-anger opened this Issue Nov 6, 2018 · 2 comments


None yet
2 participants
Copy link

green-anger commented Nov 6, 2018

There's a link to [snippet_dataset1_3]:

The third form is an extension of the previous form for datasets of arity `N`. The sample being a polymorphic tuple, each
of the variables `var1`, ..., `varN` corresponds to the index 1, ... `N` of the the sample:

Here is the snippet:

BOOST_DATA_TEST_CASE( test_case_arity2, data::xrange(2) ^ data::xrange(5), apples, potatoes)
BOOST_TEST((apples <= 1 && apples >= 0));
BOOST_TEST((potatoes <= 4 && potatoes >= 0));

But according to this

A particular handling is performed if `dsa` and `dsb` are of different size. The rule is as follow:
* if the both zipped datasets have the same size, this is the size of the resulting dataset (this size can then be infinite).
* otherwise if one of the dataset is of size 1 (singleton) or of infinite size, the resulting size is governed by the other dataset.
* otherwise an exception is thrown at runtime

the snippet must throw. And it does throw (msvc 19.15.26732.1 for x86 + boost.test 1.67.0).

So is it a broken snippet? I didn't find any mentions in the docs this to be intentional behavior.


This comment has been minimized.

Copy link

raffienficiaud commented Nov 6, 2018

Thanks you for raising this, and I agree that this is not the best way to communicate over Boost.Test features.

I'll change the snippet for the next version.

@raffienficiaud raffienficiaud self-assigned this Nov 11, 2018

@raffienficiaud raffienficiaud added this to the 1.70 milestone Feb 8, 2019

@raffienficiaud raffienficiaud added the doc label Feb 10, 2019


This comment has been minimized.

Copy link

raffienficiaud commented Feb 10, 2019

Would this be ok? 1cd5487

raffienficiaud added a commit that referenced this issue Feb 11, 2019

Merge branch 'topic/GH-176-doc-dataset' into next-internal
* topic/GH-176-doc-dataset:
  Change log
  Added documentation on throwing dataset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.