Commit Graph

25 Commits

Author SHA1 Message Date
Mateusz Łoskot
100b8e32b4
[cmake] Rationalise names of tests vs targets
Cherry-picked from develop branch commit 4dc3836449
ignoring changes in all `CMakeLists.txt` files but this one
`test/extension/toolbox/CMakeLists.txt` which somehow missed the changes.
Possibly due to my mistake during previous cherry-picks to compose
the emergency fix #394 for docs in `master` branch, that also
brought the restructuring of the tests directories.

Missing changes in `test/extension/toolbox/CMakeLists.txt` file
are currently causing failures of AzP builds using CMake
for `master` Boost 1.72 merge e8a04f403e
This is attempt to fix it in the `master`.
2019-10-30 10:25:41 +01:00
Stefan Seefeld
e8a04f403e Merge branch 'develop' for Boost 1.72 release. 2019-10-29 16:54:55 -04:00
Mateusz Łoskot
20f511b7d0
Flatten structure of test/extension/io/output/ folder (#400)
There is no need for format-specific subfolders.
There is no code in place that checks if all those folders exist and
creates them.
This change simplifies the structure to simplify running of I/O tests.

Rename images/jpg/ to images/jpeg/ in tests
The `jpeg` is name of the format used in the I/O extension and
the folders inside `images/` are named after those formats.
2019-10-29 08:59:55 +01:00
Pranam Lashkari
146d81bb7e Update extend_boundary function to handle all boundary_option-s (#398)
Closes #391
2019-10-28 17:19:27 +01:00
Mateusz Łoskot
8235ee645a
Hide convolve_1d, convolve_2d and kernel_2 in namespace detail (#397)
* Hide convolve_1d and convolve_2d in namespace detail
* Hide kernel_2d in namespace detail.
* Tidy up naming of horizontal/vertical to y/x for kernel center.

Following @lpranam comments on planned changes to convolve_2d,
which will not be ready for Boost 1.72,
@mloskot proposed to hide the function as implementation detail,
https://lists.boost.org/boost-gil/2019/10/0316.php,
until it is ready and @stefanseefeld agreed on the proposal,
https://lists.boost.org/boost-gil/2019/10/0320.php.
2019-10-24 12:50:56 +02:00
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
Pranam Lashkari
6a1c99a33c Implement image boundary extension algorithm (#386) 2019-09-05 20:47:21 +02:00
MIRAL SHAH
f6c502be02 Fix Boost guidelines violations (#378)
Add copyright notice.
Add protection from the min/max macro.

Closes #376
2019-08-09 17:36:37 +02:00
Mateusz Łoskot
9e76b8b5bf
Mark all non-simple build targets of extension/io as explicit (#370)
This addresses issues during the Boost regression runs, where builders
only provide popular third-party libraries (i.e. libraw is missing).
2019-08-09 10:50:58 +02:00
MIRAL SHAH
ca696ce6d0
Added 2D convolution definitions to numeric extension (#367)
2D convolution tests added

`convolve` function renamed to `convolve_1d`

closes #356
2019-08-09 03:17:09 +05:30
Mateusz Łoskot
a895b5eb55
Add tests for extension/numeric/pixel_numeric_operations.hpp (#372)
Add new and update existing Doxygen comments describing interfaces in
`extension/numeric/pixel_numeric_operations.hpp`.
2019-08-08 11:10:20 +02:00
Mateusz Łoskot
2607795221
Add test for three color types of PNG with tRNS chunk (#125)
The tests cover issue #117 and pull request #118, extending the coverage
for all color types that may have tRNS chunks:

  - color type 0 (grayscale), the tRNS chunk contains a single gray level
  - color type 2 (truecolor), the tRNS chunk contains a single RGB color
  - color type 3 (indexed color), the tRNS chunk contains a series of
    one-byte alpha values

Add sample PNG files from the "official" test-suite for PNG
created by Willem van Schaik.

Add <define>BOOST_GIL_IO_TEST_ALLOW_READING_IMAGES to Jamfile for PNG tests.
NOTE: Deliberately not defined BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
as it seems to require some extra configuration, currently it causes
some tests to fail. So, Jamfile likely needs more updates and clean-up.

Closes #120
2019-08-07 22:33:21 +02:00
MIRAL SHAH
11c897bb07
2D kernel support added to numeric extension (#361)
Tests for 2D numeric kernel added
2019-08-04 19:46:47 +05:30
Mateusz Łoskot
67ac10d3ab
Rename test/extension/numeric/convolve_2d.cpp to convolve.cpp (#357)
Accommodate to @miralshah365 's plan in #356 to add `convolve` function.
2019-07-30 08:10:40 +02:00
Mateusz Łoskot
d0c474eb37
Remove test/extension/io/images/pnm/readme.txt [ci skip]
There is no value in it. Contributors will ask on list or GitHub anyway.
2019-07-27 00:18:12 +02:00
Mateusz Łoskot
5d3208ec57
Add tests for extension/numeric/channel_numeric_operations.hpp (#340)
Add static assertions to verify channel types are convertible to
expected result type.

Add new and update existing Doxygen comments describing interfaces in
`extension/numeric/channel_numeric_operations.hpp`.
2019-07-25 09:18:51 +02:00
Mateusz Łoskot
90e5e1738f
Add test for convolve function from Numeric extension (#349)
Minimal test for new function added in #347 (with identity kernel only).
2019-07-22 18:59:21 +02:00
Mateusz Łoskot
dafcaa169e
Extract GIL-specific Boost.Test utilities from test/unit_test.hpp (#338)
Add separate header `test/unit_test_utility.hpp` for printers and
other utilities for better integration of GIL types with Boost.Test.
2019-07-18 17:49:05 +02:00
Mateusz Łoskot
d7884ee1a6
Fix parameters type of subimage_view functions in core and dynamic_image (#337)
Align with `subsampled_view` overloads accepting `point_t` and `coord_t`
Both types are based on `std::ptrdiff_t`. Fixes compilation warnings.
Tidy up `subimage_view` and `subsampled_view` with trailing return.
Add tests for `subimage_view` in core and dynamic_image extension.
(First tests for the dynamic_image, hurray! :))

Add explicit cast to double in division operator for point<T> to
fix compilation warnings.
2019-07-16 13:05:48 +02:00
Mateusz Łoskot
73314b19a6
[numeric] Correct name of BOOST_TEST_MODULE [ci skip] 2019-07-14 23:00:47 +02:00
Mateusz Łoskot
9ce3f08a36
Add first tests for convolve functions from Numeric extension (#335)
First stab at convolution tests includes cases with the identity kernel.
Move `pixel`-s streaming facility used by Boost.Test (required  by
`BOOST_TEST` macro) to the common header for re-use in other tests.
2019-07-14 21:43:32 +01:00
Mateusz Łoskot
ab4c686970
[numeric] std::extent not usable to obtain size of kernel_1d_fixed (#320)
Use of `std::extent` was introduced in PR #200 but it turns out as
not applicable for `std::array` or derived types (e.g. `kernel_1d_fixed`).
This led to obtaining invalid size of `kernel_1d_fixed` and erroneous
results of the rows and columns convolution.
This change replaces `std::extent` with new public constant member
`kernel_1d_fixed::static_size`.

Since `kernel_1d_fixed` is derived from `std::array`, the Alternative
could be to use `std::tuple_size` specialization for `std::array`.

Add static assertion to require that kernel size must be odd to
ensure validity at the center.
2019-07-04 20:45:33 +02:00
Mateusz Łoskot
67c3ac77c9
Add kernel test to numeric/Jamfile (#318)
Change missing from #317
2019-06-30 20:52:41 +02:00
Mateusz Łoskot
b4a69319bc
Add tests for kernel_1d and kernel_1d_fixed classes (#317)
Add FIXME and TODO comments about issues that needs to be clarified.
2019-06-29 10:38:24 +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