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

expected_failures doesnt work for BOOST_DATA_TEST_CASE #138

Closed
k15tfu opened this Issue Apr 4, 2018 · 6 comments

Comments

Projects
None yet
2 participants
@k15tfu
Copy link

k15tfu commented Apr 4, 2018

BOOST_TEST_DECORATOR(*boost::unit_test::decorator::expected_failures(5))
BOOST_DATA_TEST_CASE(test1, boost::unit_test::data::make({1}), digit) {
    BOOST_CHECK(0);
}

Output:

Running 1 test case...

0%   10   20   30   40   50   60   70   80   90   100%
|----|----|----|----|----|----|----|----|----|----|
path/to/file.cpp(206): error: in "test1/_0": check 0 has failed
Failure occurred in a following context:
    digit = 1;
***************************************************

*** 1 failure is detected (11 failures are expected) in the test module "Common"
@raffienficiaud

This comment has been minimized.

Copy link
Member

raffienficiaud commented Apr 5, 2018

What happens if you have *boost::unit_test::decorator::expected_failures(1) instead?

@k15tfu

This comment has been minimized.

Copy link
Author

k15tfu commented Oct 2, 2018

Well.. with expected_failures(1) it prints the same thing:

Running 1 test case...
/path/yo/file(26): error: in "test1/_0": check 0 has failed
Failure occurred in a following context:
    digit = 1;

*** 1 failure is detected (5 failures are expected) in the test module "Common"

P.S. 5 failures are expected -- is inherited from other test cases of the project.

@raffienficiaud

This comment has been minimized.

Copy link
Member

raffienficiaud commented Feb 12, 2019

Working on a fix, sorry for the delay

@raffienficiaud raffienficiaud self-assigned this Feb 13, 2019

@raffienficiaud

This comment has been minimized.

Copy link
Member

raffienficiaud commented Feb 13, 2019

I believe this is a duplicate of #133 and #204 as the decorators are not propagated properly from the parent test-suite. You can try the branch topic/GH-138-decorator-dataset-testcase and let me know if that works for you.

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

@raffienficiaud raffienficiaud added next and removed fix-proposed labels Feb 14, 2019

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

Merge branch 'topic/GH-138-decorator-dataset-testcase' into next-inte…
…rnal

* topic/GH-138-decorator-dataset-testcase:
  Change log
  Fixing propagation of decorators to underlying test-case generator

# Conflicts:
#	doc/closing_chapters/change_log.qbk

@raffienficiaud raffienficiaud added develop and removed next labels Feb 14, 2019

@k15tfu

This comment has been minimized.

Copy link
Author

k15tfu commented Mar 14, 2019

@raffienficiaud Yes, it works! Thank you again. Will it be released in boost-1.70.0?

@raffienficiaud

This comment has been minimized.

Copy link
Member

raffienficiaud commented Mar 15, 2019

Very good! yes it is part of 1.70. The beta is available from the website, I am not planning to make any changes apart for the documentation for the final release.

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.