summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* Define main function as "int main(void)" (with void)Hans Ulrich Niedermann2022-11-113-3/+3
|
* Add test-init-localedir test programHans Ulrich Niedermann2022-05-192-0/+76
|
* Add test-i18n.c i18n test programHans Ulrich Niedermann2021-12-122-0/+107
|
* The pedantic compilation flags might ignore some warningsHans Ulrich Niedermann2021-11-171-0/+13
|
* rearrange test-pedantic definitionsHans Ulrich Niedermann2021-11-141-75/+75
|
* tests: add pedantic compile tests for -std={c2x,c++20}Hans Ulrich Niedermann2021-11-031-0/+24
| | | | | | | | Add a pedantic C compile test for c2x in addition to the existing ones for c90, c99, and c11. Add a pedantic C++ compile test for c++20 in addition to the existing ones for c++98, c++11, c++14, and c++17.
* tests: Always define, but only test conditionallyHans Ulrich Niedermann2021-11-031-19/+18
| | | | | | | Always define the test programs, but only conditionally test them. This makes certain that they can be build, that the sources are added to the dist tarball, etc.
* tests: Remove old pedantic compilation testsHans Ulrich Niedermann2021-11-031-51/+1
| | | | | | | | | | | | These did not work with C++ on FreeBSD 13 anyway, due to c++98 not working there, which the old pedantic compilation just assumed was working without testing it in configure. The new pedantic compilation tests offer a multitude of language standards including c++98, but only tries building the pedantic compilation tests for those language standards for which configure has shown that building programs is possible at all.
* tests: declare local variable localHans Ulrich Niedermann2021-10-262-0/+2
| | | | | | | Declare local variable local by declaring it static. This avoids the clang warning about the variable not being declared static.
* tests: include system headers before gphoto2 headersHans Ulrich Niedermann2021-10-262-4/+4
| | | | | In the pedantic compilation tests, include the system headers before gphoto2 headers - which should be the way to do things.
* test-camera-list: Widen column for 4 digit number of camlibsHans Ulrich Niedermann2021-10-131-4/+6
| | | | | As the number of cameras in the list is about 2800 right now, widening the column from 3 to 4 digits makes sense.
* test-camera-list: Add --help outputHans Ulrich Niedermann2021-10-131-0/+21
|
* Avoid accidental include file name collisionsHans Ulrich Niedermann2021-10-112-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are five libgphoto2 internal *.h include files inside the source tree's `libgphoto2/` folder. Internal means they are part of the libgphoto2 implementation, and are not part of the public libgphoto2 API or ABI. These files have names which are so generic that it is difficult to see from a `#include` statement that the included file is actually part of libgphoto2: bayer-types.h bayer.h exif.h gamma.h jpeg.h While building, an additional file is created inside the `libgphoto2/` folder with a name which does hint to its relationship with libgphoto2: gphoto2-endian.h To reduce the probability of accidental conflicts with include files which might also be called the same very generic name, this changes the use of these include files to a preprocessor directive like #include "libgphoto2/bayer.h> instead of #include "bayer.h" To enforce the need for the "libgphoto2/" part in the #include preprocessor directive, this also removes the respective `-I` arguments for the `libgphoto2` subdir (both in source tree and in build tree) from `*_CPPFLAGS`. This change was inspired by `libgphoto2/` and `camlibs/stv0680/` containing very different include files both called `bayer.h`.
* comment out unused constant/variable definitionHans Ulrich Niedermann2021-10-031-1/+3
|
* Remove obsolete gp2ddb (gphoto2 device database) ideaHans Ulrich Niedermann2021-04-019-1159/+0
| | | | | | | | | | | | | | | | | | | The gphoto2 device database (gp2ddb) was originally intended to replace the device lists in the camlib code by a device list maintained in a text file outside of the camlib C code. This device list file could then be changed without recompiling camlibs, at the cost of adding a simple gp2ddb to internal binary representation compiler to libgphoto2. This would have allowed a user to very easily add a new camera model to the list of camera models supported by a specific camlib, as long as that new camera model uses the same protocol as already supported camera models do. As the gp2ddb idea has never been developed any further in the 15 yearns since my initial commit from 2006, this idea appears to be obsolete and can thus be removed from the codebase.
* Remove trailing whitespace from all *.h and *.c files.Siim Meerits2020-07-277-40/+40
|
* Fix minor typosYuri Chornoivan2020-05-251-1/+1
|
* Make sure both C and C++ programs including gphoto2 headers compileHans Ulrich Niedermann2020-02-193-2/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | Check that programs including libgphoto2 headers compile when compiled for a number of different language standards: C: ansi c99 c11 C++: ansi c++98 c++11 c++14 c++17 For each of these language standards, if the compiler does not compile an empty example program, we do not test whether compiling with the gphoto2/*.h headers included works. This will work with GCC as the compiler, and also should work with CLANG as the compiler as CLANG is mostly compatible in these matters. On other compilers, the test compile of the empty program should fail, and thus no checks with the gphoto2/*.h headers included will be performed. C90/ANSI C apparently does not define __STDC_VERSION__, so the C source code needed to be changed to become ANSI C compatible. In C++ pedantic compilation source, we now use actual C++ code instead of relying on C code working when compiled as C++ code. In Travis CI, we now actually require both C and C++.
* tests/Makefile.am: Consistent comments and definitionsHans Ulrich Niedermann2020-02-191-31/+56
| | | | | Consistently define test programs, and use comments to structurize the tests/Makefile.am file.
* Add print-libgphoto2-version programHans Ulrich Niedermann2020-02-152-0/+161
| | | | | | | | | The new print-libgphoto2-version program prints the complete libgphoto2 version message in both short and verbose. This functionality had not been available before, and we want it for checking later changes to the camlib list part of the version messages.
* Add $(AM_MAKEFLAGS) for every $(MAKE)Hans Ulrich Niedermann2020-01-181-1/+1
| | | | | | For every $(MAKE) use in Makefile.am or Makefile-files, we add $(AM_MAKEFLAGS) so we can pass the make flags to the called make subprocess.
* add log_remove func tooMarcus Meissner2017-06-031-2/+3
|
* also use gp_log_remove_func, to testMarcus Meissner2017-06-031-1/+3
| | | | https://github.com/gphoto/libgphoto2/pull/171
* remove umlauts from filesMarcus Meissner2014-06-274-5/+5
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@15020 67ed7778-7388-44ab-90cf-0a291f65f57c
* From: "Daniel P. Berrange" <dan@berrange.com>Marcus Meissner2014-04-111-2/+5
| | | | | | | | | | | The test-filesys.c code is calling gp_filesystem_get_folder and passing in a 'const char **' instead of 'char **'. It then forgets to free the heap-allocated result. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14892 67ed7778-7388-44ab-90cf-0a291f65f57c
* fixed big endianMarcus Meissner2014-02-261-13/+15
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14799 67ed7778-7388-44ab-90cf-0a291f65f57c
* fixed buildingMarcus Meissner2014-02-261-1/+2
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14798 67ed7778-7388-44ab-90cf-0a291f65f57c
* added a test-endian to check our endianess macrosMarcus Meissner2014-02-262-0/+75
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14797 67ed7778-7388-44ab-90cf-0a291f65f57c
* new fsf addressMarcus Meissner2014-01-013-6/+6
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14607 67ed7778-7388-44ab-90cf-0a291f65f57c
* test for duplicated names.Marcus Meissner2013-12-011-0/+8
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14591 67ed7778-7388-44ab-90cf-0a291f65f57c
* cleaned up AM_CPPFLAGS and CPPFLAGS usage patterns.Marcus Meissner2013-03-101-0/+1
| | | | | | | | | | AM_CPPFLAGS and CPPFLAGS are used both during build, so no need to use merge them together in configure. also move the -I$(xx) stuff into Makefile* to avoid shell expansion issues. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14269 67ed7778-7388-44ab-90cf-0a291f65f57c
* Replaced C99-style commentsDan Fandrich2010-09-152-2/+2
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@13311 67ed7778-7388-44ab-90cf-0a291f65f57c
* use the new functions, fix loggingMarcus Meissner2010-03-261-15/+12
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12847 67ed7778-7388-44ab-90cf-0a291f65f57c
* logging functions are not varargs anymoreMarcus Meissner2010-03-201-8/+3
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12810 67ed7778-7388-44ab-90cf-0a291f65f57c
* Removed unneeded and incorrect check for HAVE_FLEX_BISONDan Fandrich2009-07-311-4/+2
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12323 67ed7778-7388-44ab-90cf-0a291f65f57c
* Fixed a bunch of C89 and SUS portability issues.Dan Fandrich2009-07-301-3/+3
| | | | | | | Fixed a buffer overflow in the AOX driver. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@12305 67ed7778-7388-44ab-90cf-0a291f65f57c
* * removed CameraFileInfoFile.name, adjusted usersMarcus Meissner2009-01-251-3/+1
| | | | | | | | | | and callers. * added filename argument to put_file_func, set_info_noop and set_file_noop functions. adjusted all camlibs git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@11773 67ed7778-7388-44ab-90cf-0a291f65f57c
* removed .cvsignoreMarcus Meissner2008-09-261-7/+0
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@11354 67ed7778-7388-44ab-90cf-0a291f65f57c
* Also link against $(LIBLTDL) if linking against libgphoto2.laHans Ulrich Niedermann2007-10-172-0/+6
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10794 67ed7778-7388-44ab-90cf-0a291f65f57c
* Rework testing of camera libsHans Ulrich Niedermann2007-08-112-60/+34
| | | | | | | | | | * remove check-camera-list.sh script * run test-camera-list at "make check" with not-yet-installed camlibs * run test-camera-list at "make installcheck" with the installed camlibs * rely on presence of working "env" command for these tests git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10582 67ed7778-7388-44ab-90cf-0a291f65f57c
* fix typo in pathHans Ulrich Niedermann2007-08-111-1/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10581 67ed7778-7388-44ab-90cf-0a291f65f57c
* Fix typo, code cosmeticsHans Ulrich Niedermann2007-08-111-2/+9
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@10580 67ed7778-7388-44ab-90cf-0a291f65f57c
* revert to prev checkinMarcus Meissner2006-12-311-1/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9829 67ed7778-7388-44ab-90cf-0a291f65f57c
* fixed warning for \' by just using 'Marcus Meissner2006-12-312-2/+2
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9828 67ed7778-7388-44ab-90cf-0a291f65f57c
* make sure that the pedantic compilation tests workHans Ulrich Niedermann2006-12-293-6/+22
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9768 67ed7778-7388-44ab-90cf-0a291f65f57c
* Add version comments for print-camera-list, rename conditional for gp2ddbHans Ulrich Niedermann2006-12-111-1/+1
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9567 67ed7778-7388-44ab-90cf-0a291f65f57c
* print camlibs directory usedHans Ulrich Niedermann2006-10-171-1/+8
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9358 67ed7778-7388-44ab-90cf-0a291f65f57c
* Use _GPHOTO2_INTERNAL_CODE to compile internal code, put GP_DEBUG there.Hans Ulrich Niedermann2006-10-045-13/+6
| | | | | | | | | | | | * GP_DEBUG now is only available if _GPHOTO2_INTERNAL_CODE is defined. * _GPHOTO2_INTERNAL_CODE is defined via AM_CPPFLAGS, so all code should be compiled correctly. * Users of GP_DEBUG external to the gphoto project should use something else. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9265 67ed7778-7388-44ab-90cf-0a291f65f57c
* less testcase output clutterHans Ulrich Niedermann2006-10-041-1/+2
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9262 67ed7778-7388-44ab-90cf-0a291f65f57c
* cheat about variadic macros in C++ pedantic compilationHans Ulrich Niedermann2006-10-031-0/+9
| | | | git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@9259 67ed7778-7388-44ab-90cf-0a291f65f57c