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

[task] Port all tests to Boost.Test #57

Closed
mloskot opened this issue Mar 20, 2018 · 3 comments
Closed

[task] Port all tests to Boost.Test #57

mloskot opened this issue Mar 20, 2018 · 3 comments
Labels
cat/enhancement Improvements, but not fixes addressing identified bugs cat/refactoring Any nonfunctional changes

Comments

@mloskot
Copy link
Member

mloskot commented Mar 20, 2018

Currently, there is mixture of simple C++ programs used as tests with test suites/cases based on the Boost testing facilities.

I think the library should aim for unification of the tests to:

  • have simpler, manageable tests organisation
  • make it easier for contributors to add test cas
  • receive detailed and usable failure reports from CI builds that pin-points problem, not just boolean answer pass/fail.

Timeline: some time after the new IO extension is released, near Boost.GIL 3 :

@chhenning
Copy link
Contributor

boost.test or gtest?

@mloskot
Copy link
Member Author

mloskot commented Mar 21, 2018

The choice of test framework is usually driven by subjective preferences, that is understandable.

From practical point, why to introduce yet another third-party library as a dependency?

I think it's reasonable to stick with the 'native' Boost tools, especially there are at least two to choose from:

  1. Boost.Test (header-only or linked binary) - a heavy testing weaponry
  2. Boost.Core's header-only lightweight_test.hpp, see https://www.boost.org/libs/core/doc/html/core/lightweight_test.html

I'm personally eager to go for the lightweight_test.hpp:

  • small and simple
  • offers all features we need
  • regular main-based program
  • tests are easier to debug

@mloskot mloskot added cat/refactoring Any nonfunctional changes cat/enhancement Improvements, but not fixes addressing identified bugs labels Oct 23, 2018
@mloskot
Copy link
Member Author

mloskot commented Oct 23, 2018

As this is already happening, closing.

For simple single .cpp file tests, we prefer the Boost.Core.LightweightTest :-)
For more complex test suites with large number of test cases, especially if fixtures are used with, then we use Boost.Test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat/enhancement Improvements, but not fixes addressing identified bugs cat/refactoring Any nonfunctional changes
Projects
None yet
Development

No branches or pull requests

2 participants