Erik de Castro Lopo
ff26310437
tests/Makefile.am: Switch away from GNU make rules
...
Avoid `'%'-style pattern rules are a GNU make extension` warnings.
2017-04-16 19:58:15 +10:00
Erik de Castro Lopo
bf83b95fd9
RF64: Fix an RF64_AUTO_DOWNGRADE bug
...
Also add a test for this. The test is disabled by default because it
needs to write a 4 Gig file.
Closes: https://github.com/erikd/libsndfile/issues/238
2017-04-16 19:11:45 +10:00
evpobr
a3287d88eb
tests: Fix typos in fixes for MSVC
...
* src/test_main.c: Fix typo in HAVE_SYS_TYPES_H definition
* tests/win32_ordinal_test.c: Use correct "direct.h" header instead of "dirent.h"
Related: https://github.com/erikd/libsndfile/issues/154 , https://github.com/erikd/libsndfile/pull/234
2017-04-15 07:45:45 +10:00
Erik de Castro Lopo
197ceb315b
tests/Makefile.am: Another fix for autogen file rules
...
For Make to do its stuff, there needs to be a rule to make both the
`*.h` file and the `*.c` file.
2017-04-14 17:30:37 +10:00
Erik de Castro Lopo
7f7fc24dc3
Fix 'make distcheck'
...
* tests/pedantic-header-test.sh.in:
Commit 58737ceb48
started using "sfconfig.h" in the test files,
which made this test script fail.
* .travis.yaml:
Add `distcheck` that so PRs are checked.
2017-04-14 16:10:45 +10:00
evpobr
58737ceb48
tests: Fixes for MSVC
...
* src/test_main.c: Fix undeclared off_t type with MSVC
* tests/misc_test.c: Fix undefined S_ISCHR & S_ISBLK with MSVC
* tests/stdin_test.c: Fix undefined STDIN_FILENO with MSVC
* tests/win32_ordinal_test.c: Fix undeclared getcwd() with MSVC
* Fix missing unistd.h under Win32
Related: https://github.com/erikd/libsndfile/issues/154
2017-04-14 13:03:27 +10:00
Erik de Castro Lopo
261a0dd489
tests/Makefile.am : Fix rules for autogen-ed files
...
Previously, the `*.c` file was only being rebuilt if the `*.def`
file was changed and not if the `*.tpl` file was changed.
2017-04-14 11:23:44 +10:00
Erik de Castro Lopo
5bcfd5ff0a
Include sfconfig.h as needed
2017-04-03 18:54:49 +10:00
Erik de Castro Lopo
798c285506
tests/write_read_test.tpl: Fix function name
2017-04-02 17:43:22 +10:00
Erik de Castro Lopo
6bbd5a9caf
tests: Don't use /tmp for temporary files
...
When the program is run under American Fuzzy Lop, writing to
/tmp/ fails.
2017-03-26 13:04:51 +11:00
Erik de Castro Lopo
8dc7478ee7
tests/error_test.c: Fix uninitialized value error
...
The `SF_INFO` struct was not initialized before being passed to
`sf_open`.
Closes: https://github.com/erikd/libsndfile/issues/209
2017-03-21 18:35:12 +11:00
Erik de Castro Lopo
3b45c061d2
src/sndfile.c: Check return of write_header()
...
For some formats (like FLAC) the headers are written *just* before
the first bit of audio data. Until now, there was not check for that
the header write function returned zero.
Test included.
2017-01-30 21:48:56 +11:00
David Seifert
1bfb5a908f
Refactor generation of test-suite
...
It's more preferable to generate the testsuite when running 'make dist'
or 'make distcheck' instead of running it from the configure script.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2017-01-28 21:16:21 +11:00
Erik de Castro Lopo
4a171f8f5f
tests/write_read_test.tpl: One more check
2016-12-11 20:14:57 +11:00
Erik de Castro Lopo
0818c1685e
tests/chunk_test.c: Add test for large free chunks
2016-11-27 20:02:06 +11:00
Erik de Castro Lopo
1d7b55b483
tests/chunk_test.c: Add wav_subchunk_test
2016-11-09 06:46:07 +11:00
Erik de Castro Lopo
08dfe89c61
tests: Remove need for POSIX truncate
function
...
Windows doesn't have `truncate` and since it was only being used
to truncate the file to zero length, implement a cross platform
`truncate_file_to_zero`.
Based on an idea from <evpobr@gmail.com>.
2016-09-09 19:15:42 +10:00
Erik de Castro Lopo
ba352a1ce7
Remove all use of Variable Length Arrays
...
VLAs are somewhat unsound and are being made an optional part of ISO
C specification.
2016-09-03 18:11:56 +10:00
Erik de Castro Lopo
05288ca11e
Revert "Drop use of __USE_MINGW_ANSI_STDIO"
...
This reverts commit ac0c02de3c
.
This define is needed when cross compiling from Linux to Windows.
2016-07-03 19:02:03 +10:00
Erik de Castro Lopo
ac0c02de3c
Drop use of __USE_MINGW_ANSI_STDIO
2016-07-03 11:05:08 +10:00
Erik de Castro Lopo
7b7e0d913b
SF_CUES: Fix for big-endian CPUs
2016-04-15 22:27:08 +10:00
Erik de Castro Lopo
9ea30b4c19
Add SFC_GET_CUE_COUNT command
...
This allows retrieval of the cue marker count before retrieval.
2016-04-15 21:11:40 +10:00
Erik de Castro Lopo
eeae9a0ddc
Cues: Rename SF_CUES fields
2016-04-11 19:55:10 +10:00
Lars Palo
b0ab4e6bee
Updates to original patch
...
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2016-04-11 19:55:10 +10:00
Lars Palo
f36189554b
Added tests for cues
...
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2016-04-11 19:55:10 +10:00
Erik de Castro Lopo
95828ca2e9
Rename EXTERNAL_*
to EXTERNAL_XIPH_*`
...
New naming makes sense because adding Wavpack support would not
depend on any of the existing Xiph.Org libraries.
2016-03-14 08:17:45 +11:00
Erik de Castro Lopo
15259c2de4
tests/utils.tpl: Add test_format_or_die()
...
And use it in tests/write_read_test.tpl.
2016-02-20 11:35:54 +11:00
Erik de Castro Lopo
39b05b60c2
tests/test_wrapper.sh.in: Tweak for running under Wine
...
Recent versions of Wine from Debian seem to print information
to stdout which was screwing up the tests. Should be able to
remove/improve this when Debian fixes:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=814572
2016-02-13 17:40:13 +11:00
Erik de Castro Lopo
e2a737247a
Makefile.am: Clean up autogen usage
2016-02-08 12:02:30 +11:00
Erik de Castro Lopo
aaed5ac8f7
tests/write_read_test.tpl: Fix valgrind warning
2016-02-06 11:53:16 +11:00
Erik de Castro Lopo
fe29202250
RF64: Add support for custom chunks
...
Tests included.
2016-01-11 14:42:57 +11:00
Erik de Castro Lopo
c17c6f5768
RF64: Add 'PEAK' chunk read/write support
...
Tests included.
2016-01-06 08:39:03 +11:00
Erik de Castro Lopo
318ce3de97
RF64: Add string metadata read/write capabilities
...
Tests included.
2016-01-05 21:06:58 +11:00
Erik de Castro Lopo
b64b37777f
Add tests for CAF string metadata read/write
2016-01-03 16:26:54 +11:00
Erik de Castro Lopo
03cb3c46ff
tests/floating_point_test.tpl: Fix compiler warning
2015-12-17 22:37:38 +11:00
Erik de Castro Lopo
f29c0dc209
src/sndfile.c: Another seekable flag fix
...
Pointed out by Jeremy Friesner <jfriesne@gmail.com>.
2015-12-07 06:43:55 +11:00
Erik de Castro Lopo
776308d728
src/sndfile.c: Fix seekable regression
...
This was broken as an unintended side-effect of 19e12f564
.
Also add a test to tests/write_read_test.tpl.
2015-12-01 20:45:58 +11:00
Kylie McClain
7fbbc35b1b
Fix build on musl libc
...
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
2015-11-24 06:18:45 +11:00
Erik de Castro Lopo
b520099bbc
tests/floating_point_test.tpl: Fix compiler warnings
...
* Clang complained about taking the absolute value of an unsigned number.
* GCC complained about a signed/unsigned compare operation.
2015-11-22 20:45:04 +11:00
Erik de Castro Lopo
85bac419b8
tests/misc_test.c: Add SFC_RF64_AUTO_DOWNGRADE test
2015-10-20 13:46:21 +11:00
Erik de Castro Lopo
0d02750465
test_wrapper.sh.in: Cross compile to Windows fix
2015-10-20 13:46:21 +11:00
Erik de Castro Lopo
2f805f8d4c
Add long read/write test for CAF/ALAC
...
This is to catch the bug that was fixed in 26dfda9b71
but may also
be useful for other block based lossless codecs.
2015-10-19 13:37:31 +11:00
Erik de Castro Lopo
309e09c0d0
tests/ : Test program improvements
...
* tests/channel_test.c
* tests/compression_size_test.c
2015-10-19 13:37:31 +11:00
Erik de Castro Lopo
fbb49e9739
tests/: Revise target values
...
* floating_point_test.tpl
* checksum_test.c
2015-10-19 12:49:33 +11:00
Erik de Castro Lopo
fc7a3bea72
tests/dft_cmp.c: Fix indexing error
...
Was incorrectly using `DFT_DATA_LENGTH` instead of `DFT_SPEC_LENGTH`
to index into `spectrum` array.
2015-10-19 12:44:23 +11:00
Erik de Castro Lopo
55f0beddc6
tests: Improvements to floating point tests
...
Two basic changes:
* Increase DFT_DATA_LENGTH to 8192.
* Fill the data to 5/6ths of the length instead of 1/2.
The first is designed to catch errors in CAF/alac encoding when passed
more than 4096 samples at a time. The second makes it easier to catch
this kind os problem.
2015-10-19 12:41:50 +11:00
Erik de Castro Lopo
eea13650b9
tests/ : Fix undefined behaviour warnings.
2014-12-16 13:21:19 +11:00
Erik de Castro Lopo
4de9a5961f
tests/floating_point_test.tpl : Tweak target SNR for alac_24.caf.
2014-11-29 06:49:29 +11:00
Erik de Castro Lopo
5e7b135195
tests/win32_ordinal_test.c : Better debugging when LoadLibrary fails.
2014-11-24 22:01:43 +11:00
Erik de Castro Lopo
3d5e9d21e0
tests/test_wrapper.sh.in : Handle failure of sfversion.
2014-11-24 22:01:36 +11:00