190 Commits (cfd3050479934ead4b3ee4c063f8fc60893f01d6)

Author SHA1 Message Date
Rosen Penev 3f1fab4dee meson: fix tests as subproject
looks like relative path doesn't work correctly.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
12 months ago
Rosen Penev 8414a98d01 unitTests: fix sign comparison warnings
Signed-off-by: Rosen Penev <rosenp@gmail.com>
1 year ago
Rosen Penev 6b4732365b remove boilerplate
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev e9f07e2e48 constexpr conversions
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 0f85d5a0e9 cmake: add format file
Helps to keep the CMake stuff consistent.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev ec561bb185 meson: use more subdir meson files
Makes the main one smaller.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
kamiccolo e1efef9d84 unitTests includes PROJECT_ROOT/src (cr2header_int.hpp, etc) 2 years ago
kamiccolo 52fb9ee191 Revert "Isolate samples, unittests, coverage and overall build to PROJECT_BINARY_DIR"
This reverts commit 057ddfcf1755380583c6eb4ac97767a652fbfe9d.
2 years ago
kamiccolo 6f5b1c94db Isolate samples, unittests, coverage and overall build to PROJECT_BINARY_DIR 2 years ago
Miloš Komarčević 562ef57b4f Use CMake config mode for gMock detection 2 years ago
Pino Toscano 7f997572f5 tests: do not hardcode ENOENT
The actual values of errno constants are not specified in POSIX, and
left as implementation details; hence, tweak the check for the ENOENT
description to not check for the actual value.
2 years ago
luzpaz 39a4b9b930 Fix various typos
Found via `codespell -q 3 -S *.po,*.pot,*.ts,./doc/ChangeLog,./xmpsdk -L alis,discus,filetest,ist,nd,ois,optio,siz,te,tempdate`
Excluded 3rd-party code (ie ./xmpsdk)
2 years ago
Kevin Backhouse 33071f33b2 Fix unit test failure. 2 years ago
Rosen Penev 4c66b4440a pair noexcept with move operations
Typically done with noexcept.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev cfc0ef0b65 meson: fix tests when zlib is disabled
This sometimes shows up in CI if zlib is not found.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 22b12012a6 more SonarLint cleanups
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev ca95edc6bd random fixes
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 1f21164085 gcc: remove redundant struct
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev a3baf7d3e9 clang-tidy: no _ in tests
Found with google-readability-avoid-underscore-in-googletest-name

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 2205a14a06 clang-tidy: default init various members
Found with cppcoreguidelines-pro-type-member-init

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 95be516483 avoid shadowing warning
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 9f21b78311 add contains function
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 52ab999151 meson: add unit tests
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 785a9ed084 unitTests: fix old API usage
Found with google-upgrade-googletest-case

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev e1ac00a71f link against gtest-main
Don't bother with custom main function. No benefit.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 376638259d namespace enforce.hpp functions to Internal
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Rosen Penev 77834807c2 add support for gcc and clang 7
Uses std::experimental::filesystem

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
Kevin Backhouse 43c9ec0f50
Add EXIV2_ENABLE_INIH flag to enable building without libinih. 2 years ago
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
2 years ago
Kevin Backhouse 346e11493f
Merge pull request #2443 from kevinbackhouse/inih-from-library3
Remove libinih from codebase and add it as a dependency instead
2 years ago
Rosen Penev d458bf2540 clang-tidy: apply to newly merged stuff
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2 years ago
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
2 years ago
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>
2 years ago
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
2 years ago
Kevin Backhouse a4164ce866
Remove libinih from codebase and add it as a dependency instead. 3 years ago
Kevin Backhouse dc5dc0d2e3 clang-format 3 years ago
Rosen Penev 436cdf0a7e Use std::enable_if_t and std::is_signed_v. 3 years ago
Kevin Backhouse ddd7ccf722 Use std::is_signed and std::enable_if. 3 years ago
Kevin Backhouse b9b2d7741b
Fix some "unsafe vector access" warnings. 3 years ago
Luis Díaz Más c9bdd6ed94
Merge pull request #2209 from Exiv2/mainTODOs
Improvements around TODO comments
3 years ago
Rosen Penev a86bc386da reference conversions
There's no nullptr here.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más d4ffcb9497 utils are in Internal namespace 3 years ago
Luis Díaz Más 74da8a394f Remove deprecated todo 3 years ago
Luis Díaz Más d5742f449b Move string helpers to utils 3 years ago
Luis Díaz Más 1a3e93856b More tests for rational convertions 3 years ago
Luis Díaz Más 8da71e7133 Test parseUint32 and fix it when number is out of limits 3 years ago
Luis Díaz Más 331924612e Remove duplication by using templates 3 years ago
Luis Díaz Más 2b91b5daf9 More tests for DataBuf read/write functions 3 years ago
Luis Díaz Más 6964f5f9f2 DataBuf::c_data() returns nullptr when empty + avoid duplication
After the previous commit, I realized that std::vector::data() also
returns nullptr when the vector is empty. So I decided to emulate this
behavior in DataBuf::c_data().

Anyways, the changes done in the previous commit are valid and allow us
to avoid some processing when the DataBuf is empty.
3 years ago
Luis Díaz Más 4a4a8c544c Throwing when trying to access TooFar elements in DataBuf 3 years ago