8 Commits (c754ca6d1439d022bd4254cf007cea5caeb29b51)

Author SHA1 Message Date
Dan Čermák 842dd4cecc Add a unit tests for enforce() 7 years ago
Dan Čermák 3b3283e37d Added unit tests for new overflow checking addition functions 8 years ago
Luis Diaz Mas ec09c98adb add few characterisation tests for exiv2::strError 8 years ago
Luis Díaz Más cc7ff4122d Export all symbols when running unit tests. Add dummy test for private code.
I tried to use directly the private OBJECT library (exiv2lib_int) in the unit_tests targets, but the private objects have dependencies on the public symbols (circular dependency)
and therefore it is impossible to test the private code with that approach with the current design of the library.

Starting from CMake 3.3 we can use the variable CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS to export all the symbols of a shared library:
https://blog.kitware.com/create-dlls-on-windows-without-declspec-using-new-cmake-export-all-feature/

Even having the opportunity to use this variable (that will be only used when EXIV2_BUILD_UNIT_TESTS is enabled) the previous commits are still valid.
It is interesting to clearly differentiate between the public and private code of the library. Enforcing this, make us think twice before putting code in the public
part of the library.
8 years ago
Luis Díaz Más cfe614d8c3 Provide a gtestWrapper header to skip useless warnings 8 years ago
Luis Diaz Mas 2e8376dccc Do not use Gtest imported target (Not available in minimum CMake version required) 8 years ago
Luis Díaz Más 2bad771834 (CMake) Add GTEST_LINKED_AS_SHARED_LIBRARY definition 8 years ago
Luis Díaz Más 26189ad287 (CMake) Add a new CMake option to enable the new Unit Tests 8 years ago