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.
Import the selection of integer types into boost::gil namespace,
and move from channel.hpp to typedefs.hpp for easier access.
Replace bits32f with float32_t and bits64f with float64_t
- kept as alias of scoped_channel_value.
Move float64_t (bits64f) to typedefs.hpp.
Replace the four {float|double}_{zero|one} min/max channel values
with float_point_zero and float_point_one templates.
Replace <boost/cstdint,hpp> with C++11 <cstdint>.
Introduce preference of using declaration instead of typedef.
Reformat typedefs.hpp to take advantage of the using declaration
- works much better for left-to-right reading, alias name as
most important detail comes first.
Add some of missing #include typedefs.hpp, sort some headers.
This enables test runners to copy the file to the target. It also makes
the code that looks for the file in a different path unnecessary since
Boost.Build will pass the proper relative path.
Bump MSVC warning level to W4
Preparing for detailed warnings clean up based on:
https://svn.boost.org/trac10/wiki/Guidelines/WarningsGuidelines
Group compilation flags and defines in common top-level Jamfile
- relies on Boost.Build feature of referring parent Jamfile-s.
Reverts commit SHA-1:e80f9d2f4b2c688b3f7a77b9845e28793e4f5d0b
Preparing to verify if fix for overflowing bit-shift operation (UB)
suggested by Andrey Semashev via Boost ML will fix the checksum bug too.
See discussions for #46 and #50 for details.
First stab at collection of CMakeLists.txt for Boost.GIL
- Allow building and testing boostorg/gil against Boost from
cloned superproject or installed distribution.
Add CMakeSettings.json config file for VS2017 integration with CMake
- Defines build configurations for VS and Ninja generators.
- Can be used as is or as a template ready to customise.
Add conanfile.txt for Conan package manager (eg. for cmake -DGIL_USE_CONAN=ON).
Add .editignore file to with basic encoding of CMake and CI scripts.
Update .appveyor.yml with two extra CMake-based builds (allowed to fail).
Merged revisions 52726-52731 via svnmerge from
https://svn.boost.org/svn/boost/trunk
........
r52726 | danieljames | 2009-05-02 13:38:39 +0100 (Sat, 02 May 2009) | 3 lines
Check in the doxygen files for building standalone gil docs.
They are mostly unchanged. I've just changed some of the paths.
........
r52727 | danieljames | 2009-05-02 13:39:02 +0100 (Sat, 02 May 2009) | 16 lines
Make the gil doxygen docs a litte more boost friendly and a bit to build.
* Add a shell script to make building easier.
* Merge the two different versions of adobe_source.css.
* `shorten_file_name.sh`:
* Add copyright.
* Use GNU sed and expr in shorten_file_name.sh.
* Optimise it slightly by using xargs instead of a loop.
* Only shorten file names in html files.
* `header.html`:
* Add copyright notice to doxygen header.
* Remove google analytics tags.
* Remove adobe RSS feed.
* Remove the link to `globals.html` as it isn't generated.
* Rename to `header_html.txt` to stop inspect complaining about it.
* Remove `insert_boost_licence.sh` as the copyright is already in the header.
........
r52728 | danieljames | 2009-05-02 13:43:21 +0100 (Sat, 02 May 2009) | 1 line
Regenerate gil documentation.
........
r52729 | danieljames | 2009-05-02 13:45:17 +0100 (Sat, 02 May 2009) | 1 line
Redirect to the correct page for the adobe docs.
........
r52730 | danieljames | 2009-05-02 13:45:51 +0100 (Sat, 02 May 2009) | 1 line
Detab a few files.
........
r52731 | danieljames | 2009-05-02 13:58:46 +0100 (Sat, 02 May 2009) | 3 lines
Generate GIL documentation again.
Something went wrong checking it in last time.
........
[SVN r53046]