31 Commits (main)

Author SHA1 Message Date
Rosen Penev 8414a98d01 unitTests: fix sign comparison warnings
Signed-off-by: Rosen Penev <rosenp@gmail.com>
1 year ago
Kevin Backhouse 33071f33b2 Fix unit test failure. 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
Luis Díaz Más 74da8a394f Remove deprecated todo 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
Luis Díaz Más 3b9fcb4b3d Update .clang-format to align pointers to the types 3 years ago
Luis Díaz Más 30bf563f4d Update .clang-format file & apply clang-format to whole project 3 years ago
Rosen Penev 887b08b0b7 clang-tidy: range loop conversion
Signed-off-by: Rosen Penev <rosenp@gmail.com>
3 years ago
Luis Díaz Más b17828b454
Use SPDX for licenses (#2122)
* Use SPDX identifier in header files

* Use SPDX identifier in rest of source files

* Fix usage of SPDX for files with 2 licenses

* Add global license file

* Fix compilation
3 years ago
Luis Díaz Más 5d627433fc Remove useless DataBuf::clear() 3 years ago
Kevin Backhouse 9ff72e5ca5
Make offset=0 the default parameter. 4 years ago
Kevin Backhouse aec6733df9
Add unit test for methods like DataBuf::read_uint32 and DataBuf::write_uint32. 4 years ago
Kevin Backhouse c9d0cf3643
Make fields of DataBuf private. 4 years ago
Rosen Penev 2c57f214c5 clang-tidy: use nullptr
Found with modernize-use-nullptr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Rosen Penev c73dfa0106 clang-tidy: use uppercase numeric literals
Found with readability-uppercase-literal-suffix

Signed-off-by: Rosen Penev <rosenp@gmail.com>
4 years ago
Luis Díaz Más db4ece70cc gtest - remove wrapper which is not needed anymore 4 years ago
Luis Díaz Más de4d43d4d1 Fix warnings EXIV2_TEAM_EXTRA_WARNINGS
Most of the warnings fixed were:
- Hiding of local variables
- Hiding of globals
- Useless casts
- Conversions between float/double
4 years ago
Robin Mills d632988bbd Massive code prolog cleanup. 4 years ago
Luis Díaz Más 24be5a514e [Appveyor] Build exiv2 with Visual Studio 2012 and 2013
- Integration tests had to be disabled with 2012 and 2013. There were
few (4) tests failing for these cases.
- Only bring libiconv with conan when a windows subsystem is detected.
- libiconv can be enabled now with a conan option.
- Use infinity instead of INFINITY
- Use conan_basic_setup(). Fixes a problem with gtest is VS2012
- call vcvarsall.bat for each compiler version so that nmake can be
found.
7 years ago
Luis Díaz Más 4161099b91 Fix warnings reported by MSVC 7 years ago
Dan Čermák e705f1ef5b Add unit test for floatToRationalCast 7 years ago
Luis Díaz Más cfe614d8c3 Provide a gtestWrapper header to skip useless warnings 8 years ago
Luis Díaz Más 752e7a6bea Add simple unit tests for DataBuf 8 years ago
Luis Díaz Más 72cf9166fe Add simple tests for exifTime 8 years ago
Luis Díaz Más 26189ad287 (CMake) Add a new CMake option to enable the new Unit Tests 8 years ago