Go to file
Mateusz Loskot 73ec99e606 Refactor single-program channel test to Boost.Test suites and cases
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.
2018-06-27 00:02:27 -04:00
.ci Update documentation. 2018-06-27 00:02:27 -04:00
.circleci [circleci] Deploy root Jamfile with common compilation config 2018-06-27 00:02:27 -04:00
.github Simplify labelling proposal 2018-06-27 00:02:27 -04:00
doc Fix cross-references. 2018-06-27 00:02:27 -04:00
example Replace bitsN[s] aliases with C++11 fixed width integer types 2018-06-27 00:02:27 -04:00
include/boost [io/bmp] Explain DIB orientation variants that affect reading 2018-06-27 00:02:27 -04:00
io Replace bitsN[s] aliases with C++11 fixed width integer types 2018-06-27 00:02:27 -04:00
meta Add metadata file. 2017-07-13 10:01:51 -04:00
numeric [cmake] Replicate GCC/clang compile flags from Jamfile 2018-06-27 00:02:27 -04:00
test Refactor single-program channel test to Boost.Test suites and cases 2018-06-27 00:02:27 -04:00
toolbox Replace bitsN[s] aliases with C++11 fixed width integer types 2018-06-27 00:02:27 -04:00
.appveyor.yml [appveyor] Fix build jobs using CMake 2018-06-27 00:02:27 -04:00
.editorconfig Add configuration for CircleCI builds 2018-06-27 00:02:27 -04:00
.gitattributes Refine .gitattributes to reflect current content of repository (#63) 2018-06-27 00:02:27 -04:00
.gitignore Tidy up .gitignore with sections. 2018-06-27 00:02:27 -04:00
.travis.yml Install a more recent sphinx. 2018-06-27 00:02:27 -04:00
CMakeLists.txt Refactor single-program channel test to Boost.Test suites and cases 2018-06-27 00:02:27 -04:00
CMakeSettings.json Restore default CMake settings in CMakeSettings.json 2018-06-27 00:02:27 -04:00
conanfile.txt Add basic CMake configuration for Boost.GIL 2018-06-27 00:02:27 -04:00
CONTRIBUTING.md Clarify console input belongs to listed steps 2018-06-27 00:02:27 -04:00
fabscript Add more build options. 2018-06-27 00:02:27 -04:00
index.html Update documentation. 2018-06-27 00:02:27 -04:00
Jamfile Refactor single-program channel test to Boost.Test suites and cases 2018-06-27 00:02:27 -04:00
README.md Add configuration for CircleCI builds 2018-06-27 00:02:27 -04:00
sublibs Added sublibs file telling regression tools that subdirs contain library tests 2018-06-27 00:02:27 -04:00

logo

Boost.GIL is a part of the Boost C++ Libraries.

The Boost Generic Image Library (GIL) is a C++ library that abstracts image representations from algorithms and allows writing code that can work on a variety of images with performance similar to hand-writing for a specific image type.

Licence Documentation Wiki Mailing List Gitter

Test results

Branch Travis (gcc/clang) AppVeyor (VS2017) CircleCI (gcc/clang) Regression
develop Travis AppVeyor CircleCI gil
master Travis AppVeyor - gil