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

Warnings for parameterised tests due to duplicate test names #640

Open
tobiasleibner opened this issue Oct 9, 2024 · 1 comment
Open

Comments

@tobiasleibner
Copy link

Expected Behavior

Parameterized tests should work without warnings.

Actual Behavior

Parameterized tests result in warnings like

WARNING test 'types' for test suite 'global' already present

The tests seems to be run for all parameters, though, so the warnings seems to be harmless (?).

Steps to Reproduce the Problem

  1. Open example from the documentation on parameterized tests on Godbolt (https://godbolt.org/z/4xGGdo)
  2. Compile and run the example (using x86_64 GCC 14.2, -std=c++20) -> The warnings show up when executing the test (and there are a few compiler warnings during the compilation but that is not the subject of this issue)
  3. Change the include to
    #include <https://raw.githubusercontent.com/boost-experimental/ut/v2.0.0/include/boost/ut.hpp>
    -> The warnings are gone
  4. Change the include to
    #include <https://raw.githubusercontent.com/boost-experimental/ut/v2.1.0/include/boost/ut.hpp>
    -> The warnings appear again.
@tobiasleibner tobiasleibner changed the title Regression in v2.1.0: Warnings for parameterised tests Warnings for parameterised tests due to duplicate test names Jan 31, 2025
@tobiasleibner
Copy link
Author

Turns out this was actually not a regression in v2.1.0, the warnings are there in earlier versions but they are only printed on failing tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant