Stephen F. Booth
19ee7c86c4
Merge branch 'master' into taglib2
2018-10-28 10:53:23 -05:00
Jonas Kvinge
d71398c953
Add DSF and DSDIFF file types management ( #878 )
...
* Add DSF and DSDIFF file types management
* Fixes for some build chains
* unit64_t replaced by unsigned long long, warning fixes
* Remove C++11 extension incompatible with some build chains (enumeration in a nested name specifier)
* Change typedef types (uint, ulong, ...) to standard types
remove BUILD_FRAMEWORK changes from this pull request
* Replace deprecated String::null and ByteVector::null by String() and ByteVector()
Styling update, thanks to FestusHagen
* Restyling
* Restyling to reduce length of excessively long lines
* Add to detectByExtension
* Added `isSupported(IOStream *stream)` to `DSF::File` and `DSDIFF::File`
2018-10-26 19:45:49 -05:00
Sergei Trofimovich
0b583bafd0
taglib: fix test build failure on powerpc/c++11 ( #834 )
...
powerpc is a platform with 'char' == 'unsigned char'.
As a result '-1' is not expressible in char and build fails as:
```
# '-funsigned-char' to force test build failure on other platforms
$ cmake .. -DBUILD_TESTS=YES -DCMAKE_CXX_FLAGS="-O2 -funsigned-char" -DCMAKE_C_FLAGS="-O2 -funsigned-char"
...
$ make check
tests/test_synchdata.cpp: In member function 'void TestID3v2SynchData::testToUIntBroken()':
tests/test_synchdata.cpp:78:33: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
char data[] = { 0, 0, 0, -1 };
^
```
The fix is to expliticly cast -1 to 'char'.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2017-09-18 20:06:55 -05:00
Tsuda Kageyu
89f06af3f7
Remove a deprecated function FileRef::create().
2017-06-12 17:27:08 +09:00
Tsuda Kageyu
3ae0d4aa90
Merge branch 'master' into merge-master-to-taglib2
...
# Conflicts:
# taglib/fileref.cpp
# taglib/fileref.h
# taglib/mpeg/mpegheader.cpp
# taglib/tagutils.h
2017-06-12 17:23:44 +09:00
Tsuda Kageyu
1fb310ec1f
Merge pull request #799 from TsudaKageyu/filetype-detection
...
Enable FileRef to detect file types by the actual content of a stream.
2017-06-12 13:04:15 +09:00
Tsuda Kageyu
10e8866fec
Merge branch 'master' into merge-master-to-taglib2
...
# Conflicts:
# ConfigureChecks.cmake
# taglib/CMakeLists.txt
# taglib/mpeg/id3v2/frames/synchronizedlyricsframe.cpp
# taglib/toolkit/tfilestream.cpp
2017-06-09 11:11:44 +09:00
Tsuda Kageyu
c2fe93c12b
Restore FileRef::create() in order not to change the previous behavior.
2017-06-06 09:17:34 +09:00
Tsuda Kageyu
22de22b701
Fix memory leaks in a test.
2017-05-26 16:49:36 +09:00
Tsuda Kageyu
bd4a45b07e
Merge branch 'master' into merge-master-to-taglib2
...
# Conflicts:
# ConfigureChecks.cmake
# taglib/CMakeLists.txt
# taglib/asf/asfattribute.cpp
# taglib/it/itproperties.cpp
# taglib/mod/modproperties.cpp
# taglib/mpeg/mpegfile.cpp
# taglib/mpeg/mpegproperties.cpp
# taglib/ogg/flac/oggflacfile.cpp
# taglib/s3m/s3mproperties.cpp
# taglib/tagunion.cpp
# taglib/toolkit/tfile.cpp
# taglib/toolkit/trefcounter.h
# taglib/toolkit/tstring.cpp
# taglib/xm/xmproperties.cpp
# tests/test_mpeg.cpp
2017-02-21 10:22:20 +09:00
Tsuda Kageyu
d4d8410c08
Restore the layout of the copyright header of test_fileref.cpp.
2017-02-04 23:45:15 +09:00
Tsuda Kageyu
931bb042c3
Enable FileRef to detect file types by the actual content of a stream.
...
FileRef doesn't work with ByteVectorStream as reported at #796 , since ByteVectorStream is not associated with a file name and FileRef detects file types based on file extensions.
This commit makes FileRef to work with ByteVectorStream by enabling it to detect file types based on the actual content of a stream.
2017-02-04 23:31:08 +09:00
Tsuda Kageyu
87fc4012f4
Add some test cases for invalid UTF-8 sequences.
2017-01-31 14:27:23 +09:00
Tsuda Kageyu
dd5ab2a08f
Fix and add some test cases for invalid surrogate pairs.
2017-01-31 14:19:30 +09:00
Tsuda Kageyu
2c7ac6d6a9
Add a few more test cases for invalid UTF-8 sequences.
2017-01-30 12:56:53 +09:00
Tsuda Kageyu
6a61f02f85
Merge pull request #794 from TsudaKageyu/utf8-library
...
Replace unicode.h/unicode.cpp by the UTF8-CPP library.
2017-01-30 12:54:43 +09:00
Tsuda Kageyu
038b52ae01
Check an invalid UTF-8 sequence consists of single char.
...
Single char can be an invalid UTF sequence. For example, { 0x80 } is invalid.
2017-01-30 11:35:39 +09:00
Tsuda Kageyu
3d14ff74b1
Remove a duplicate test file.
2017-01-27 22:10:02 +09:00
Tsuda Kageyu
0c45c63943
Replace unicode.h/unicode.cpp by the UTF8-CPP library.
...
unicode.h/unicode.cpp are no longer maintained and incompatible with Debian's guideline.
UTF8-CPP is maintained on GitHub and published under the Boost Software License which is compatible with either LGPL or MPL and should go along with Debian's guideline.
2017-01-27 14:47:55 +09:00
Tsuda Kageyu
586c9bd962
Add a test for unpaired surrogate characters in a UTF-16 string.
2017-01-26 17:33:54 +09:00
Tsuda Kageyu
6bb92c34fa
Ignore fake MPEG frame headers when seeking them.
2017-01-20 22:38:25 +09:00
Tsuda Kageyu
13be28a52c
Be tolerant of empty FLAC seektable blocks.
2017-01-10 00:11:13 +09:00
Ramesh Shanmugasundaram
83c72518ab
Renamed unsupported-extension.xxx and modified test
...
The file name unsupported-extension.xxx causes issue when unpacked
taglib-xxx.gz over an NFS partition. The file extension ".xxx" is the
one NFS uses for its own purpose and hence it will not allow creation
of this file.
Hence renamed the file and modified the test cases that checks for this
file.
Signed-off-by: Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>
2016-12-22 15:19:45 +00:00
Tsuda Kageyu
d8114059ee
Merge branch 'master' into merge-master-to-taglib2
...
# Conflicts:
# config.h.cmake
# taglib/ogg/xiphcomment.cpp
# taglib/taglib_config.h.cmake
# taglib/toolkit/tbytevector.cpp
# taglib/toolkit/trefcounter.cpp
# taglib/toolkit/tstring.cpp
# taglib/toolkit/tutils.h
# taglib/toolkit/tzlib.cpp
# taglib/xm/xmfile.cpp
# tests/test_string.cpp
# tests/test_xiphcomment.cpp
2016-12-13 13:52:35 +09:00
mathbunnyru
7eab1bf6df
Add explicit keyword wherever easily possible
2016-12-10 15:44:38 +03:00
Tsuda Kageyu
36ccad2bd4
Rewrite ByteVector::replace() to run in O(n) time.
2016-12-05 11:02:59 +09:00
Tsuda Kageyu
b00a5c1aab
Add a test to check if ByteVector is detached correctly when being replaced.
2016-12-05 10:15:26 +09:00
Tsuda Kageyu
cfbaf34597
Prevent the segment table of Ogg pages from exceeding the size limit.
2016-12-01 10:51:59 +09:00
Tsuda Kageyu
4381bd75f3
Add a test for #743/#779.
2016-11-29 10:53:33 +09:00
Tsuda Kageyu
d3062f3af4
A bit more tolerant check to return itself in String::substr().
2016-11-26 13:05:14 +09:00
Martin Flaska
6cfb11bb12
test_string: Make 'stripWhiteSpace' test more complex
...
No string without leading/trailing spaces was used in the test.
Signed-off-by: Martin Flaska <martin.flaska@legrand.us>
2016-11-25 13:56:39 +01:00
Tsuda Kageyu
ad075a56f9
Suppress MSVC warnings in test.
2016-11-24 14:45:22 +09:00
Tsuda Kageyu
b98a984b66
Fix handling of lowercase 'metadata_block_picture' fields in Vorbis comments.
...
Also refactored some redundant code for parsing pictures.
2016-11-11 00:07:32 +09:00
Tsuda Kageyu
f9a747dceb
Avoid adding fields with invalid keys to Vorbis Comments.
...
According to the spec, '\x7F' is not allowed.
2016-11-10 23:35:14 +09:00
Tsuda Kageyu
7b8d576bde
Don't decode redundant UTF-8 sequences in Win32.
...
Linux and OS X are working well and won't be affected.
2016-11-10 17:12:58 +09:00
Tsuda Kageyu
2651372291
Separate some tests to make them more specific.
2016-11-09 15:51:33 +09:00
Tsuda Kageyu
bd5688ae5f
Merge branch 'master' into merge-master-to-taglib2
...
# Conflicts:
# taglib/mp4/mp4atom.cpp
# taglib/toolkit/tutils.h
# tests/test_apetag.cpp
2016-11-09 11:05:53 +09:00
Tsuda Kageyu
499f6db977
Check invalid Unicode APE keys properly.
2016-11-09 00:29:03 +09:00
Tsuda Kageyu
253c61e37d
Merge pull request #765 from TsudaKageyu/zero-length-atom
...
Proper handling of MP4 atoms with zero length.
2016-11-08 21:12:47 +09:00
Tsuda Kageyu
1848b3bc6f
Merge pull request #759 from ufleisch/mp4_classical
...
Support new classical music frames introduced with iTunes 12.5, #758 .
2016-11-08 21:12:31 +09:00
Tsuda Kageyu
13223ad497
Merge branch 'master' into merge-master-to-taglib2
...
# Conflicts:
# taglib/mp4/mp4atom.cpp
# taglib/toolkit/tlist.tcc
# taglib/toolkit/tmap.tcc
# tests/test_asf.cpp
# tests/test_ogg.cpp
# tests/test_oggflac.cpp
# tests/test_opus.cpp
# tests/test_speex.cpp
2016-11-04 17:18:59 +09:00
Tsuda Kageyu
f5ca097379
Proper handling of MP4 atoms with zero length.
...
If the size of an atom is 0, it designates the last atom which extends to the end of the file.
2016-11-02 15:44:50 +09:00
Tsuda Kageyu
e6a69e24bc
Add a common function to generate a long string to test.
2016-10-31 20:01:52 +09:00
Tsuda Kageyu
dcab8ed90e
Allow ScopedFileCopy to be const.
2016-10-31 10:29:13 +09:00
Tsuda Kageyu
921a68ae55
Fix mismatched types in tests.
2016-10-30 21:29:06 +09:00
Tsuda Kageyu
d9df59306f
Merge branch 'master' into merge-master-to-taglib2
...
# Conflicts:
# AUTHORS
# ConfigureChecks.cmake
# taglib/asf/asfutils.h
# taglib/mp4/mp4atom.cpp
# taglib/mp4/mp4tag.h
# taglib/mpeg/id3v2/frames/ownershipframe.cpp
# taglib/mpeg/id3v2/frames/synchronizedlyricsframe.cpp
# taglib/mpeg/id3v2/frames/tableofcontentsframe.cpp
# taglib/mpeg/id3v2/id3v2frame.cpp
# taglib/riff/rifffile.cpp
# taglib/riff/rifffile.h
# taglib/toolkit/taglib.h
# taglib/toolkit/tbytevector.cpp
# taglib/toolkit/tfilestream.cpp
# taglib/toolkit/tstring.cpp
# taglib/toolkit/tutils.h
# taglib/xm/xmfile.cpp
# tests/test_bytevector.cpp
# tests/test_fileref.cpp
# tests/test_id3v2.cpp
# tests/test_riff.cpp
# tests/test_string.cpp
2016-10-30 21:20:23 +09:00
Tsuda Kageyu
935534aa53
Backport a test from taglib2 branch.
2016-10-28 15:19:35 +09:00
Tsuda Kageyu
aa5f9bb221
Suppress some warnings in test.
2016-10-27 15:23:24 +09:00
Tsuda Kageyu
d2b3547254
Add a test for File::truncate().
2016-10-27 15:15:22 +09:00
Tsuda Kageyu
6a96a6426a
Replace a possibly non-free file in the test suite.
2016-10-22 02:11:16 +09:00