2
0
mirror of https://github.com/boostorg/gil.git synced 2026-01-28 19:22:11 +00:00
Commit Graph

31 Commits

Author SHA1 Message Date
Processor228
628165368f Provide testcase that shows the fix in action 2025-12-05 18:59:42 +03:00
Dirk Stolle
32eabbc553 chore: fix more typos (#753) 2024-07-23 09:40:16 +02:00
Dirk Stolle
74ffdcb047 chore: fix some typos (#751) 2024-07-08 10:40:31 +02:00
Andrey Semashev
322c4e2e19 Updated Boost.Filesystem usage. (#741)
Removed usage of Boost.Filesystem APIs that were deprecated and
then removed.
2024-01-27 11:09:10 +01:00
Mateusz Łoskot
526c898336 test: Add tiled TIFF test case to simple_all_formats
This is to hit more lines and make codecov happier,
than during recent build of PR #685
2022-06-25 22:02:21 +02:00
Dirk Stolle
4f83beb735 style: Remove trailing space characters (#651) 2022-04-26 20:52:56 +02:00
Mateusz Łoskot
f4c70a8606 Add support for <filesystem> to IO (#636)
If neither <filesystem> nor <experimental/filesystem> is detected,
then require <boost/filesystem.hpp>.

If user defines BOOST_GIL_IO_USE_BOOST_FILESYSTEM macro,
then <boost/filesystem.hpp> is pre-selected and required,
and search for any of the C++ standard implementation is skipped.

Remove end-user macro BOOST_GIL_IO_ADD_FS_PATH_SUPPORT
Require tests to always build with support of either
detected C++ filesystem or pre-selected Boost.Filesystem.

Closes ##222
2022-02-22 19:18:55 +01:00
Mateusz Łoskot
4738a38295 test: Catch up IO with switch to variant2 migration (#607)
See discussion at
https://github.com/boostorg/gil/issues/453#issuecomment-833898207

Closes #606
2021-05-11 06:54:39 +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
cc64bdd1a4 Always build test/extension/io/targa tests for images hosted in source tree
Remove use of compile-time configuration macros
  - BOOST_GIL_IO_TEST_ALLOW_READING_IMAGES
  - BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES

Remove BOOST_GIL_IO_USE_TARGA_FILEFORMAT_TEST_SUITE_IMAGES as not used anymore.
2020-03-30 00:42:10 +02:00
Mateusz Łoskot
7f4f5f1b61 Simplify test/extension/io/CMakeLists.txt
Remove uses of deprecated configuration defines
  - BOOST_GIL_IO_TEST_ALLOW_READING_IMAGES
  - BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
2020-03-29 00:59:18 +01:00
Mateusz Łoskot
f85eaada0f Catch and report exceptions thrown from test/extension//simple test
Prevent ungraceful test program termination, with core dump.
2020-03-26 00:19:25 +01:00
Mateusz Łoskot
fbc462b29b Remove compile-time configuration macros from Jamfile 2020-03-26 00:07:43 +01:00
Mateusz Łoskot
8bd0959d3f Catch and report exceptions thrown from test/extension/io/bmp tests
Prevent ungraceful test program termination, with core dump.
Rename make.cpp to bmp_make.cpp.
2020-03-26 00:05:13 +01:00
Mateusz Łoskot
f098f9b2bc Always build test/extension/io/bmp//make for images hosted in source tree
Remove use of compile-time configuration macros
   - BOOST_GIL_IO_TEST_ALLOW_READING_IMAGES
   - BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES

Updates dbbdfd611e
2020-03-25 23:13:16 +01:00
Mateusz Łoskot
dbbdfd611e Always build test/extension/io/bmp tests for images hosted in source tree
Remove use of compile-time configuration macros
  - BOOST_GIL_IO_TEST_ALLOW_READING_IMAGES
  - BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES

Narrow use of BOOST_GIL_IO_USE_BMP_TEST_SUITE_IMAGES macro.
2020-03-25 23:07:32 +01:00
Mateusz Łoskot
ab0e400063 Always build test/extension/io//simple if format libraries are available (#467)
This is part of efforts removing use of compile-time configuration macros
  BOOST_GIL_IO_TEST_ALLOW_READING_IMAGES
  BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
2020-03-25 10:30:18 +01:00
Mateusz Łoskot
70ff5648d0 Replace Boost.Test with Boost.LightweightTest in test/extension/io (#464)
Move test sources to format-specific directories.
Add FIXME and TODO comments about issues discovered while building the format-specific tests.
Add missing `#include`-s with standard library headers.
Apply minor corrections and tidying up.

Continues #459
Closes #461
2020-03-24 10:21:20 +01: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
d2b560de74 Remove faber build system scripts as unmaintained 2020-03-20 21:42:36 +01:00
Mateusz Łoskot
5ced6e5614 Fix issues with test/extension/io/tiff_test.cpp build and run (#455)
* CMake: Fix look-up for TIFF add-in library for C++ (tiffxx)
* IO: Add missing rgba8_image_t to any_image for tiff
  - test/extension/io/images/tiff/test.tif is RGBA
2020-03-20 10:21:25 +01:00
Pranam Lashkari
808eafbd6c Corrected failing IO test (#426) 2020-01-21 00:21:04 +01:00
Sourabh Dharpure
5bfc4211f5 Prefix CMake parameters with BOOST_ (#419) 2020-01-16 20:14:10 +01:00
Olzhas Zhumabek
ab60512f9f Fix #401: segmentation fault when reading purposely corrupted png image (#414)
* Add corrupted png read test

Add test provided by
https://github.com/misos1
that shows segfault behavior when
png header is corrupted

* Throw exception if errored in png func

This commit modified apply and
read_rows functions to guard against
errors that appear in libpng functions,
and throws exceptions instead of
segfaulting
2020-01-15 16:34:42 +06:00
Mateusz Łoskot
cd40a87b83 Replace use of boost/core/lightweight_test.hpp with Boost.Test (#417)
Refactoring to unify use of the common framework across GIL tests.
Merge `unit_test_utility.hpp` into `unit_test.hpp` for convenience.
Add several test cases to `gil::point` tests.
2020-01-13 22:38:06 +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
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
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
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
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
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