2
0
mirror of https://github.com/boostorg/gil.git synced 2026-01-23 05:32:12 +00:00

21 Commits

Author SHA1 Message Date
Samuel Debionne
3d8dcb68bf Omit pmr image tests on apple clang 15 2025-11-25 21:40:19 +01:00
Dirk Stolle
74ffdcb047 chore: fix some typos (#751) 2024-07-08 10:40:31 +02:00
Mateusz Łoskot
2409be4bd6 test: Add more basic cases for image class (#423)
This hopefully will begin extensive test suite for the image class to
maintain decent coverage for this major class of GIL.
2022-06-29 23:00:03 +02:00
Samuel Debionne
4dbf35a510 Add pmr image typedefs (#529)
* Add pmr image typedefs

* Swap allocators only if it propagate on container

* Do not call propagate_on_container_swap for C++14

Co-authored-by: Mateusz Łoskot <mateusz@loskot.net>
2022-06-28 07:35:27 +01:00
Mateusz Łoskot
ef9b89a93a test: Add test cases for image with empty dimensions (#702)
Test fix #649
2022-06-28 06:59:33 +01:00
Mateusz Łoskot
a0ac9fb4aa test: Case test_constructor_from_view was not called 2022-06-28 00:34:44 +02:00
Dirk Stolle
4f83beb735 style: Remove trailing space characters (#651) 2022-04-26 20:52:56 +02:00
theroyn
2e2764225f Support constructing a planar image from interleaved image (#552)
Fixes #478
2021-01-30 21:11:51 +01:00
Samuel Debionne
f374a672a0 Add image constructor from compatible view (#520)
* Use pixels_are_compatible instead of std::is_convertible
2020-10-11 21:38:36 +02:00
Samuel Debionne
05ee4c8cc6 Fix image constructor from other image (#477)
Add image constructor test for constructor from other image type
that exercises the template constructor.
2020-04-11 13:21:21 +02:00
Samuel Debionne
9b055f285b Add move semantics to image class (#457)
Since we do not require C++17 yet with its `if constexpr
that would discard instantiation of allocator's `operator=`
when the statement is not active, we have to use the tag
dispatching with appropriate used of
`propagate_on_container_move_assignment` and
rebound `allocator_type` to choose the POCMA.

Minor coding style fixes.
2020-04-06 23:50:01 +02:00
Mateusz Łoskot
f641190948 Replace BOOST_TEST with BOOST_TEST_EQ for streamable operands (#472)
Improve utilities sending channels, pixels and other GIL objects to
output stream for logging of test errors.

Fix missing namespace qualification in IO tests.

Comment TARGA test case with FIXME that was accidentally
uncommented in cc64bdd1a4
2020-04-01 01:54:12 +02:00
Mateusz Łoskot
dda885e5ff Replace Boost.Test with Boost.LightweightTest in test/ (#459)
Motivation is to:
- use on simpler and light test framework,
- eliminate dependency on libraries like Boost.MPL,
- achieve faster compilation times for CI builds (20% seems feasible)
- have test programs easy to run and debug
- avoid macros

Remove outdated FIXME-s for bugs that have been already fixed.
Fix off-by-one bug in test/core/test_fixture.hpp generators.
Minor corrections and tidying up.

Add missing test assertions to numeric extension tests.
Fixes #458
2020-03-21 22:53:09 +01:00
Mateusz Łoskot
5f3c00244b Fix missing alignment default value in image constructor (#429)
Fixes #424 blocking PR #423
2020-02-01 18:02:43 +01:00
Mateusz Łoskot
d527916db0 Add test for pixel types with std::uninitialized_fill (#418)
Since `std::uninitialized_fill` performs a placement new on each
element in the range, it is important to ensure core and packed
pixel types behave correctly.

Split general purpose test fixtures into core/test_fixture.hpp.
2020-01-18 11:03:17 +01:00
Mateusz Łoskot
79ad37f75a Clean up BOOST_TEST_MODULE values for naming of test suites (#415)
Fix some Jamfile-s to not just `compile` some tests but also `run`, where applicable.
Remove redundant `project` definition from Jamfile-s.
2020-01-09 11:44:25 +01:00
Mateusz Łoskot
5d69ccf987 Cast to int to avoid signed/unsignd mismatch 2019-08-01 01:23:18 +02:00
Mateusz Łoskot
584cdd4e23 Modify random_value fixture test to cope with repeated values (seeding issue) 2019-07-18 21:37:39 +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
baeac8ce87 Disable BOOST_GIL_USE_CONCEPT_CHECK when compiling tests with clang (#304)
Avoid Clang flooding with non-disableable warnings like:

   T does not declare any constructor to initialize its non-modifiable members

when compiling with concepts check enabled.

Bug 41759: `warn_no_constructor_for_refconst` can not be disabled (Boost.ConceptCheck)
https://bugs.llvm.org/show_bug.cgi?id=41759
2019-06-02 06:13:04 +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