Currently, UBSan integer checks report several false positives due to
unsigned integer overflows (well-defined).
Instead of hiding them completely, keep them displayed on the matrix
until we decide how to handle. For example, there may be some issues
regarding size of unsigned type used, etc.
Sort variant=ubsan_* jobs.
tools/boostdep/depinst/depinst.py helper automatically calculates
maximum set of required Boost libraries, based on #include-s.
Manual listing should help to control any new additions
and prevent introduction of unwanted dependencies.
Rename GIL_NONWORD_POINTER_ALIGNMENT_SUPPORTED
to BOOST_GIL_CONFIG_HAS_UNALIGNED_ACCESS.
Undefine BOOST_GIL_CONFIG_HAS_UNALIGNED_ACCESS by default and document it.
If defined, issue warning or error, depending on target platform.
This changes how packed_channel_reference_base-based channels perform
access - aligned memory access by default.
This also fixes undefined behavior detected by UBSan in some test cases.
The build variants enable group of checks offered by clang
UndefinedBehaviorSanitizer detector.
Add sanitizers suppression file in .ci/blacklist.supp based on
copy of the file from Boost.Beast.
Update Travis CI:
- Add .ci/build-and-test.sh script as handy proxy for b2 command.
- Add build jobs for each of the three new UBSan variants.
- Display COMPILER and VARIANT first as these two are most important
details while inspecting the build matrix
(TOOLSET can be derived from COMPILER).
Add GIL_DISABLE_FINDBOOST_DOWNLAOD option (default=OFF).
Output values of Boost_INCLUDE_DIRS and BOOST_LIBRARY_DIRS
- should help to know which Boost we are building GIL against.
Fix add_executable with empty sources list.
Copied from Boost.Geometry, including original tests, with some non-functional
modifications explained in the comments.
The utility can be used where it is important to avoid integer overflow.
Motivation:
- state clearly what is covered with tests without reading non-trivial code
- avoid cleverness - tests should be no-brainer
- get closer to one test case targets one feature/beaviour with one check
- replace obscure `throw std::exception` with diagnostics that are actually
useful to pin-point failure cause and location - makes CI logs useful.
- allow to select and run specific tests
- make tests maintenance easy, quick and fun
Propose new structure of tests that reflects the previous tests hierarchy,
but organizes channel tests in test/channel directory with test programs
each covering specific library feature (or set of closely related features).
The refactored tests cover 100% of checks from the old `channel.cpp`,
plus it refines or adds a bunch more.
NOTE: old test/channel.cpp has not been removed yet.
Common definitions from the single test/channel.cpp moved to
channel_test_fixtures.hpp and namespace boost::gil::test::fixture:
Classes and typedefs:
- `do_test` as `fixture::channel`
- `value_core` as `fixture::channel_value`
- `reference_core` as `fixture::channel_reference`
- `packed_reference_core` as `fixture::packed_channel_reference`
- `packed_dynamic_reference_core` as `fixture::packed_dynamic_channel_reference`
- `channel_archetype` and relatives to `channel_concepts.cpp` which is compile
test in Jamfile
- `test_packed_channel_reference()` parts as `fixture::packed_channels565`
- `test_packed_dynamic_channel_reference()` parts as `fixture::packed_dynamic_channels565`
Test case functions called from `do_test<T>::test_all`:
- `test_channel_invert()` to `algorithm_channel_invert.cpp` suite
- `test_channel_convert()` to `algorithm_channel_convert.cpp` suite
- `test_channel_multiply()` to `algorithm_channel_multiply.cpp` suite
- `test_channel_math()` split to `algorithm_channel_relation.cpp`
and `algorithm_channel_arithmetic.cpp`
Add test cases for each channel value type T as used to run from
`test_channel_value_impl<T>`, `test_packed_channel_reference<T>` and
`test_packed_dynamic_channel_reference<T>`.
Add list of possible T-s defined as type-lists `fixture::channel_byte_types`,
`fixture::channel_integer_types`, `channel_float_types` and
`channel_bitfield_types` which used with `BOOST_AUTO_TEST_CASE_TEMPLATE`
generate all possible combination of inputs.
Add new `channel_test_fixture.cpp` is a self-test suite verifying the fixtures.