Commit Graph

58 Commits

Author SHA1 Message Date
Rosen Penev
e1ac00a71f link against gtest-main
Don't bother with custom main function. No benefit.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2023-02-13 09:29:47 -08:00
Kevin Backhouse
43c9ec0f50
Add EXIV2_ENABLE_INIH flag to enable building without libinih. 2023-01-16 10:33:25 +00:00
Mohamed Ali Chebbi
1c764358bb
Encapsulate video support with compilation variable EXV_ENABLE_VIDEO (#2448)
* Encapsulate video support with compilation variable EXV_ENABLE_VIDEO

* Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: add variable to unit test files

* Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: encapsulate in makefile

* Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: fix PR windows matrix

* Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: activate only for concerned CI tests

* Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: desable for linux release

* Encapsulate video support with compilation variable EXV_ENABLE_VIDEO: add to Fuzz PR
2023-01-04 13:01:34 +01:00
Kevin Backhouse
346e11493f
Merge pull request #2443 from kevinbackhouse/inih-from-library3
Remove libinih from codebase and add it as a dependency instead
2023-01-04 10:44:47 +00:00
Mohamed Ali Chebbi
7fac35e19a
1748 Video Support in V1.0: part 3/3 : support Asfvideo (#2416)
* 1748 Video Support in V1.0: part 3/3 : support AsfVideo

* 1748 Video Support in V1.0: part 3/3 : support AsfVideo : fix Mac Os error compile

* 1748 Video Support in V1.0: part 3/3 : support AsfVideo : delete unuseful warnings

* code review and clean up some code
2022-12-31 18:20:31 +01:00
Mohamed Ali Chebbi
d755fc18b5
1748 Video Support in V1.0: part 2/3 : support Riffvideo (#2415)
* 1748 Video Support in V1.0: part 2/3 : support RiffVideo

* limit the buffer_size

* Update exiv2.md

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>

* Code Review and cleanUp code

* Update riffvideo.hpp

Co-authored-by: Ben McCann <322311+benmccann@users.noreply.github.com>
2022-12-31 10:45:45 +01:00
Mohamed Ali Chebbi
1280f3b849
1748 Video Support in V1.0: part 1/3 : support MatroskaViedo (#2413)
* 1748 Video Support in V1.0: part 1/3 : support MatroskaViedo

* Simplify the code of matroskavideo

* protect conevrtuint64 method from overflow

* use size_t instead of uint64_t
2022-12-30 15:58:07 +01:00
Kevin Backhouse
a4164ce866
Remove libinih from codebase and add it as a dependency instead. 2022-12-28 09:33:08 -06:00
Luis Díaz Más
d5742f449b Move string helpers to utils 2022-04-14 10:41:01 +02:00
Luis Diaz
7366a64d44 Add unit tests for Photoshop::isIrb().
It has been detected that we need to always pass the size==4 in the call
to isIrb. Probably it is better to remove that parameter and document
that it is assumed for the buffer to have a length of 4 bytes.
2022-04-06 15:18:43 +02:00
Luis Díaz Más
1545a1bc4a JP2 - stronger checks on Signatuer and FileType boxes 2022-03-18 14:55:16 +01:00
Luis Diaz
b48e8e9379 Add unit tests for Jp2Image revealing bugs (see #2147) 2022-03-18 14:36:35 +01:00
Luis Diaz
65568b056e Add unit tests for Error class 2022-03-12 16:58:41 +01:00
Luis Díaz Más
405f4b5f1b Remove Util::dirname and finally the util files 2022-02-18 13:51:38 +01:00
Luis Díaz Más
a725d22ea5 add characterisation tests for utils 2022-02-18 13:51:37 +01:00
Luis Diaz
b7d5c7e22a Link against stdc++fs on Linux when it is needed 2022-02-16 14:39:10 +01:00
Luis Díaz Más
c499d02dbf Add characterisation test for ImageFactory::create(type)
- Split test identifying which Images can be created and which not
- Add tests for the ImageFactory::create(type, filePath)
2022-02-14 17:04:55 +01:00
Luis Díaz Más
d8fcbc4562 Add new tests for Iptc classes 2022-02-04 17:21:10 +01:00
Luis Díaz Más
071e73fa4d Add many tests for datasets 2022-02-04 17:21:10 +01:00
Luis Diaz
edf39e00dd Add new BMP tests 2022-02-04 17:21:10 +01:00
Luis Diaz
c19425f6a4 Add unit tests for PngChunk::keyTXTChunk 2022-01-07 09:38:42 +01:00
Robin Mills
f3393f8308 Fixes following review. 2021-12-20 11:01:17 +00:00
Luis Díaz Más
4c5c8538f5 Ignore missing PDBs 2021-05-17 07:31:45 +02:00
Luis Díaz Más
6c2141959a conan - change generator to be able to use latest expat version 2021-05-17 07:31:45 +02:00
Luis Diaz Mas
e87424b5e0 Add CTest support 2021-05-15 16:58:24 +02:00
Luis Díaz Más
5a8511545f unitTests - use internal library object instead of recompiling sources 2021-04-23 14:53:08 +02:00
Luis Díaz Más
db4ece70cc gtest - remove wrapper which is not needed anymore 2021-04-23 14:53:08 +02:00
Luis Díaz Más
6c0059b5a0 cmake: Treat xmpsdk headers as system ones
This is done so that when we use EXIV2_TEAM_EXTRA_WARNINGS we do not get
warnings about XMPSDK (we do not want to deal with those)
2021-04-18 18:49:58 +02:00
Luis Díaz Más
e9fe24639a cmake - Modern use of consuming gtest 2021-04-15 06:56:37 +02:00
postscript-dev
207a0d65c9 Change LangAltValue::read() tests to unitTests
Removed previous Python tests.
2021-03-09 11:58:55 +00:00
clanmills
63a13e8620 Adding option -DEXIV2_BUILD_USE_C++11 2020-05-02 12:21:21 +01:00
Robin Mills
df04671976 Enforce cxx_std_98 in samples, unit_tests, and exiv2 application (to eliminate 2305 GCC unique_ptr warnings) 2020-04-30 11:20:37 +01:00
Luis Diaz Mas
2732c10a86 Add unit tests for FileIO: canSeekBeyondEOF fails 2020-04-24 07:25:19 +02:00
Kevin Backhouse
edb4bf78ca Add bounds check to MemIo::seek(). (#944)
- Regression test for missing bounds check in MemIo::seek()
- Add bounds check to MemIo::seek(), this fixes CVE-2019-13504

(cherry picked from commit bd0afe0390439b2c424d881c8c6eb0c5624e31d9)

Additional fixes for 0.27:
- Add fix for the linux variant of MemIo::seek
- Change type of variable from unsigned to signed
2019-07-28 12:43:06 +02:00
Luis Díaz Más
0058dd1099 Use compile definitions only if they are available 2019-07-17 22:34:15 +02:00
Robin Mills
0c282f8373 Looking better all the time, Gentlemen. I believe the only changes between the patches are in unitTests/CMakeLists.txt.
This build passes the test suite and jens.cpp on MacOS-X.  I'll submit and see what the CI has to say.  With the changes only relating to unitTests (which I didn't run on FreeBSD), we should not have disturbed Linux/FreeBSD/jens.cpp.
2019-07-17 22:30:18 +02:00
Luis Díaz Más
4ed5bdc78b CMake: Supress MSVC PDB warnings 2018-11-27 18:20:20 +01:00
Luis Díaz Más
4d47b08a16 CMake: Move gtest finding to unitTests folder 2018-11-14 19:53:59 +01:00
Luis Díaz Más
244f00bf3a CMake: Do not add conan global compiler flags
+ Add conan-gtest compile definitions for the unit_tests target
2018-11-06 08:02:33 +01:00
Dan Čermák
30787e6f1e [binaryToString] Add unit tests 2018-10-11 14:06:16 +02:00
Dan Čermák
98bca06592 Add Slices: views of STL containers & C-arrays and add unit tests
This commit adds a very simple implementation of std::span but with
mandatory range checks and only the most essential functionality.
2018-10-11 14:06:16 +02:00
Luis Díaz Más
b9f913d5af Move implementation to .cpp files. Fix more issues related to visibility settings 2018-09-14 13:20:08 +02:00
Luis Díaz Más
e3f975137c Use STATIC_DEFINE to solve issues with OBJECT library 2018-09-14 13:20:08 +02:00
Luis Díaz Más
6ba4081f95 Use CMake-GenerateExportHeader to generate a macro to export symbols
- Delete the hardcoded macros in config.h taking care of that.
2018-09-14 13:20:08 +02:00
Luis Diaz Mas
0cf7d4fad8 Add unit tests for the TimeValue class 2018-09-10 08:40:55 +02:00
Dan Čermák
dd52b1a832 Add helper_functions.cpp/hpp & unit tests
- add function which constructs a new std::string from a potentially not null
  terminated char *
- add unit tests
2018-05-27 09:38:27 +02:00
Luis Diaz Mas
b1c34ee11f Add unit tests for Cr2Header 2018-05-26 18:19:40 +02:00
Luis Diaz Mas
bf0b7affaa Add few basic unit tests for DateValue
I feel more confortable doing changes in a code that I do not know by
having some unit tests around it. These characterisation tests will
also be useful as documentation.
2018-04-08 10:10:12 +02:00
Luis Díaz Más
b545605d25 Add characterisation tests for XmpKey 2018-04-07 20:04:22 +02:00
Dan Čermák
8b7941b733 [cmake] Add EXTRA_COMPILE_FLAGS to samples & unitTests
Add the additional compiler flags added by -DEXIV2_TEAM_EXTRA_WARNINGS=ON to
the targets in samples/ & unitTests/
This fixes #204
2018-03-29 13:17:24 +02:00