Commit Graph

25 Commits

Author SHA1 Message Date
Mateusz Łoskot
96df5442bc
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).

(cherry picked from develop branch commit 4ed7701b47)
2019-09-26 11:43:13 +02:00
Mateusz Łoskot
715d760be8
Add build-project color missing from test/Jamfile 2019-03-25 20:38:17 +01:00
Mateusz Łoskot
213b55c6ad
Add test for iterator concepts (#242) 2019-02-24 18:15:06 +00:00
Mateusz Łoskot
48db4f51a3
Add test for locator concepts (#241) 2019-02-23 11:16:57 +00:00
Mateusz Łoskot
8e7bda62f5
Move GIL's original test suites to test/legacy/ (#239)
Document maintenance rules of `test/legacy/` content.

Motivation to move the `test/legacy/` is to:
* clarify status of those tests
* make it easier to run tests selectively
* separate new/upcoming feature-specific tests
  from those all-in-one tests.

Other changes:
Rename `gil_test_common.hpp` to `unit_test.hpp` to make
it clearer it acts as `boost/test/unit_test.hpp proxy`.
Remove `<include>$(BOOST_ROOT)` from `Jamfile`-s as unnecessary.
2019-02-20 19:03:28 +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
6763a8cd98
Build core tests with BOOST_GIL_USE_CONCEPT_CHECK defined (#230)
when building tests with both, Boost.Build and CMake.

Disable concepts check for tests where range (e.g. std::array)
used as image pixel - not fully specialised as acceptable pixel type.

Ignore warnings from boost/concept_check.hpp
Rationalise uses of GCC and clang diagnostic push/pop,
with adding constraint for GCC 4.6+ as minimum version
where the pragma was introduced.

Closes #228
2019-02-05 22:19:35 +00:00
Mateusz Łoskot
86a30a2484 Switch from header-only to linked boost_unit_test_framework
The linked variant of the Boost.UTF seems recommended.
It may help to avoid mysterious run-time error on Mac OS:
    boost::runtime::access_to_missing_argument:
    There is no argument provided for parameter color_output
It also may speed up compilation during CI builds.
2019-01-03 23:53:54 +01:00
Mateusz Łoskot
1075967712
Move self-contained headers test to test/headers
Modify Boost.Jam script generating tests to support targets per the library
directories/modules.
2018-12-06 22:35:39 +01:00
Mateusz Loskot
53dc1a6949
Add basic tests for point<T> (#156) 2018-10-20 16:35:29 +02:00
Mateusz Łoskot
875136885a
Fix conflict with std::fill_n and boost::range::fill_n (Trac 7189)
Add minimal test for the std::fill and boost::array or std::array as
pixel type.
2018-10-12 18:34:28 +02:00
Mateusz Łoskot
9dc67eae1d
Add test to verify headers are self-contained
For each header, a translation unit is generated along with
corresponding compile target.
Currently, only boost/gil/*.hpp and boost/gil/io/* headres are included.

On CI services, compile self_contained_headers targets only if
TEST_HEADERS environment variable is set. This is to avoid build
timeouts due to CI services limits.
When running b2 locally, the tests are compiled by default.
2018-10-05 18:11:08 +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
4500543a74 Add missing template keyword prior to dependent name axis_iterator (Trac 8896)
* Apply patch from https://svn.boost.org/trac10/ticket/8896
* Add compile-time test of RandomAccessNDImageViewConcept
  * Confirms the reported failure (tested with GCC 7.3 and clang 5.0)
  * Verifies correctness of the patch
2018-08-23 16:05:38 +02:00
Mateusz Łoskot
b8af11db87 Add promote_integral metafunction
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.
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
Niklas Angare
acf760719c Take input filename on the command line to test/image.
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.
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
2c1af1d420 Remove unused define BOOST_GIL_NO_IO 2018-06-27 00:02:27 -04:00
Stefan Seefeld
e2c423bb8f Fix file lookup error. 2018-06-27 00:02:27 -04:00
Stefan Seefeld
31879b85cb Stop using boost::test 2018-06-27 00:02:27 -04:00
Vladimir Prus
8140f4b645 Remove V1 Jamfiles
[SVN r38516]
2007-08-08 19:02:26 +00:00
Lubomir Bourdev
560f17c1d1 Hooked up GIL regression tests to run from boost/status
Added kth_channel_view (like nth_channel_view but operates on heterogeneous views)


[SVN r37659]
2007-05-10 22:39:02 +00:00
Lubomir Bourdev
bde62ada6b Fixed headers to refer to the Boost license.
[SVN r37610]
2007-05-07 07:33:33 +00:00
Lubomir Bourdev
9311679cb0 Initial version of boost/libs/gil
[SVN r37496]
2007-04-24 01:58:42 +00:00