2
0
mirror of https://github.com/boostorg/gil.git synced 2026-01-25 06:12:22 +00:00

5 Commits

Author SHA1 Message Date
Pranam Lashkari
87a3157c4b numeric extension move into core part 4
moved numeric/pixel_numeric_operations.hpp into core
2022-02-18 14:25:59 +05:30
Mateusz Łoskot
446c1a2132 Fix overflow in RGB to CMYK32 conversion (#470)
Correct calculation to correctly map CMYK 0 to minimum
and 1 to maximum of input and output channel types.

If float-point division is necessary, use double instead of float
which may be too narrow for large operands. cmyk32_pixel_t is based on
uint32_t which multiplication by its maximum may yield result too
large to fit 32-bit float.

For example, (uint32_t(c) -  uint32_t(k)) * float(s) for
  c = 4294967295, k = 0, s = 1.0
results in 4294967300 value which does not fit uint32_t.

Fixes #406, but does not fix #479
2020-04-10 19:11:33 +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
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
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