Commit Graph

21 Commits

Author SHA1 Message Date
Mateusz Łoskot
3877432826
Fix project name in comment [ci skip] 2019-05-31 22:58:11 +02:00
Mateusz Łoskot
628bfc2b65
Add minimal top-level Jamfile to run test/ project
Related to #302
2019-05-28 21:31:40 +02:00
Mateusz Łoskot
4ed7701b47
Move tests of extensions inside test/ directory (#302)
Split header tests accordingly i.e. test core headers as part of
core tests, numeric extension headers as part of numeric tests, etc.

It extends the convention of sub-directories already established in
`include/boost/gil` directory. It is sensible to follow it in other
areas of the source tree (i.e. `test/`, `doc/` and `benchmark/`).

Another important reason to move the tests is to enable removal of
the top-level `Jamfile` with all its definitions of test-specific
requirements.
The top-level `Jamfile` is not advised, especially if it specifies
build requirements like C++ language version.
Those affect non-tests builds e.g. documentation, causing failures
during generation of HTML documentation (leads to missing docs).
2019-05-28 18:58:22 +02:00
Mateusz Łoskot
7e7bacd932
Remove -Wextra from default flags [skip ci]
Move it to the set of non-CI flags.
2019-05-03 00:37:38 +02:00
Mateusz Łoskot
9207ffc52a
Use Boost.Build 'cxxstd' feature instead of '-std' compiler flag (#266)
The cxxstd=11,14,17,... is the recommended way, announced here
https://lists.boost.org/Archives/boost/2017/10/239485.php
2019-03-22 08:16:11 +01:00
Mateusz Łoskot
c43d3ea4e0
Disable pedantic compilation for CI builds (#265)
Some background about rationale behind this change can be found at
https://github.com/boostorg/mp11/issues/31
and
https://github.com/boostorg/build/issues/394
2019-03-21 19:26:25 +01:00
Mateusz Łoskot
a8697bd21b
Fix Jamfile syntax for multiple <define> 2019-03-21 17:48:13 +01:00
Nikita Kniazev
4db69da7b8 Add tests requirements (#260)
Will wash away failures on unsupported compilers from the regression board
2019-03-18 19:12:06 +01:00
Mateusz Łoskot
4cf2a2c1da
Disable detailed warnings on CI builds (#240)
This should help to avoid failures on Travis CI (and possibly others):

  The job exceeded the maximum log length, and has been terminated.
2019-02-22 23:04:12 +00:00
Mateusz Łoskot
5f241af90d
[ci] Ensure CI builds clone pre-determined super-project branch
Rename custom variant with gil_ prefix.
Do not define project ID from Jamfile-s as unnecessary.
The project ID-s and build features are global resources, easy to clash.

Add recently added test/ subdirectories to build.
2019-02-19 18:21:28 +01:00
Mateusz Łoskot
aac69ac846
Add first batch of examples to Jamfile
Update examples to catch up with recent changes and ensure they both
compile without errors (using GCC 5).
2018-09-21 23:02:49 +02:00
Mateusz Łoskot
ecc19de7c9
Simplify and clean up Jamfiles
Rename Jamfile.v2 to Jamfile - BBV1 is dead.
Remove numeric/test/test.cpp as redundant.
2018-09-21 18:02:37 +02:00
Mateusz Łoskot
29f84f402c Add GCC flags extended with extra warnings [ci skip]
Currently, the extended flags are disabled by default.
The list of extra warnings taken from Trac ticket
https://svn.boost.org/trac10/ticket/4014
2018-08-25 10:07:22 +02:00
Mateusz Łoskot
f3d80cfddb [b2] Add -Wcast-align to <cxxflags> for GCC/clang [ci skip] 2018-06-27 00:02:27 -04:00
Mateusz Łoskot
189889e39f Add Boost.Build variants for UBSan-enabled builds
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).
2018-06-27 00:02:27 -04:00
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
Mateusz Loskot
4bc6575f5f Build tests with -fsanitize=undefined
Sort common compilation flags
2018-06-27 00:02:27 -04:00
Mateusz Loskot
87b7fdbcab [msvc] Build tests with NOMINMAX to suppress min/max macros 2018-06-27 00:02:27 -04:00
Mateusz Loskot
5737caa039 Require C++11 or later
Add necessary flags to Boost.Build and CMake configurations
as well as CI builds.
2018-06-27 00:02:27 -04:00
Mateusz Loskot
a37469e3ad Extend GCC and clang cxxflags for detailed warnings
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.
2018-06-27 00:02:27 -04:00
Mateusz Loskot
21eac67690 Add Boost.GIL top-level Jamfile 2018-06-27 00:02:27 -04:00