Compiling on Windows with clang this code:
#define BOOST_TEST_MODULE The Test
#include <boost/test/included/unit_test.hpp>
command:
"clang.exe" -c -x c++ test.cpp -Iboost -fno-ms-compatibility
produces:
boost/test/utils/basic_cstring/basic_cstring.hpp:64:29: error: enumerator value evaluates to 18446744073709551615, which cannot be narrowed to type 'int' [-Wc++11-narrowing]
* topic/12597-report-tests-with-clashing-names:
Change log and doc update
Avoiding duplicate test cases in template and param test cases
Check for clashing names in adding test units
- execution_monitor.ipp: m_sig_info doesn't have all the POSIX designated members and VxWorks has no USER signal
- basic_cstring.hpp: Diab compiler has limit on size of enum, similar to the IBM compiler
- VxWorks also has limited signals
Most of the difficulty came from the fact that c-strings are also c-arrays, but comparisons are made in a different way (eg. not considering the last \0 element in the computation of the size, etc)
- is_forward_iterable now just checks if the type has accessors that makes it forward iterable (no size member function for instance)
- new concept: is_forward_container_iterable that looks for forward_iterable access + size and specific types. This is needed in order to disambiguate the dataset creation for arrays from the ones for collections
- is_cstring is now only for the C-string type of arrays. std::string and basic_cstring are not a C-strings anymore
- new concept is_cstring_comparable: indicates that types can be compared as if they were strings
- new concept for converting types to a basic_cstring, used for comparisons
- wrapper for accessing the begin/end/size (works for containers and C-arrays
- copy ctor for basic_cstring
- boost.range(begin/end) does not work well for array types
- unit tests for the message part: for checking the dataset, we need to register it and then to re-run it under our own environment (so technically it runs twice in the test module)
- refactoring of tests for reusing the stream checker that is agnostic to filenames location, testing time, etc. Modifying the baseline outputs accordingly
- simplifying the logic behind the operations
- minor doc fixes
- tests output change slightly due to the fact that <= and >= are now going through the
floating point comparison
- BOOST_TEST_GLOBAL_FIXTURE explained
- BOOST_TEST_GLOBAL_INITIALIZATION explained
- changed the examples, deprecating BOOST_GLOBAL_FIXTURE
- in the logger part, introduced the fact that BOOST_TEST_GLOBAL_INITIALIZATION should be used and no assertion is supported in this case
- considering skipped tests: a skipped test is not considered as an error, especially when there was no logged information
- removing CR/LF from TU names
- updating the JUnit output
- additional refactoring of junit
- new macros:
BOOST_TEST_GLOBAL_FIXTURE: for global "real" fixtures
BOOST_TEST_GLOBAL_CONFIGURATION: for global configuration of observers.
- deprecating BOOST_GLOBAL_FIXTURE. BOOST_GLOBAL_FIXTURE and BOOST_TEST_GLOBAL_CONFIGURATION are currently
fully equivalent, the former being confusing in term of scope/role is deprecated
- SFINAE detection for a setup/teardown function within the fixture class
- Attaching global fixture to the main or master test unit being executed, exactly as other fixtures. Global fixtures
via BOOST_TEST_GLOBAL_FIXTURE registers themselves in a particular field of the framework and are attached each time
the framework executes the tests, such that we can run the framework on another test root and still benefit from the
global fixtures. The global fixtures are appended to already existing fixtures (in case the master test suite is not
the root of the current execution tree).
- Checking that the framework setup is not failing for running the test
- RAII class for restoring the global fixtures
- Tests on the setup/teardown detection
- Tests on global fixtures and baseline
- Fixing several logging issues
Some additional refactoring
- renaming m_curr_test_case to m_curr_test_unit
- function for providing the current test unit (and not only the current test case)
- for output_stream comparison: stops properly if the reference stream is shorter than the current one,
initialises the read char correctly to 0 and prints a proper ~ at the mismatch location