Commit Graph

119 Commits

Author SHA1 Message Date
Martchus 1c4f485b10 Fix compilation of test for Windows 2018-10-07 21:58:36 +02:00
Martchus 13bccb12f0 Enable all tests under Windows
Since workingCopyPath() has now been implemented under
Windows it is possible to enable the entire testsuite.
2018-10-07 21:58:15 +02:00
Martchus 6f2dcdc2d9 Fix leaking memory or file handles in StreamDataBlock descendants
StreamDataBlock needs a virtual d'tor since it is supposed to
be subclassed but the d'tor will be called on the base type.

The leaking file handles were observed by invoking the tests
with strace, eg.:
strace -e trace=file,close ./tagparser_tests
2018-08-11 23:12:12 +02:00
Martchus a2ff0f418f Fix typo occured -> occurred 2018-07-23 14:44:06 +02:00
Martchus e75a8d25c5 Adjust values()/setValues() to handle multiple values per text frame
See https://github.com/Martchus/tagparser/issues/10
2018-07-12 12:34:38 +02:00
Martchus a87ad5f5ec Don't use global variable for backup directory 2018-07-12 12:34:38 +02:00
Martchus 1a97d91b27 Preserve multiple strings in ID3v2 text frames 2018-07-12 12:34:38 +02:00
Martchus c71a497f2b Don't generate testfiles during testrun
Instead, all additional files are generated in
download_testfiles.sh.
2018-07-11 12:02:30 +02:00
Martchus f7ce79ca47 Don't check encoder version for test file generated with ffmpeg 2018-07-11 12:00:53 +02:00
Martchus 105d8ac83a Test tagging recoding from Android camera app 2018-07-09 16:03:26 +02:00
Martchus 761b380c03 tests: Fix mkvmerge path 2018-07-09 15:37:48 +02:00
Martchus f27dbd8934 Update documentation 2018-07-09 12:42:14 +02:00
Martchus 5b8ce47270 Use CPPUNIT_ASSERT_EQUAL in OverallTests::checkMp3TestMetaData() 2018-07-01 22:20:44 +02:00
Martchus d64084ec78 Refactor formatting list of values 2018-07-01 22:11:34 +02:00
Martchus 943123afa1 Warn about ID3v2 text frame with multiple strings
First step to support multiple strings within ID3v2 text
frame.

See
* https://github.com/Martchus/tagparser/issues/10
* https://github.com/Martchus/tageditor/issues/38
2018-07-01 02:04:29 +02:00
Martchus bfe8979812 Fix 2 refs in documentation 2018-06-03 21:00:49 +02:00
Martchus b7d47cd374 Extend tests for utilities 2018-06-03 20:32:52 +02:00
Martchus 3c29430790 Extend TagValueTests to cover recent fixes 2018-06-03 19:20:02 +02:00
Martchus 60c757dcf6 Add c'tor overload to TagValue to prevent conversion to string 2018-06-03 19:04:48 +02:00
Martchus b58eac9302 Use CPPUNIT_ASSERT_EQUAL in tests where possible 2018-04-30 19:00:22 +02:00
Martchus 0f0260fb77 Fix parseTags() for FLAC, consider tags unsupported if container unknown
FLAC stores tags on track level. Hence we must parse the
tracks here in order to parse the tags. This hasn't been taken
into account when refactoring the tag editor CLI leading to
https://github.com/Martchus/tageditor/issues/36.

So let's handle these format specific details in the tagparser
library which will now internally parse tracks when calling
parseTags() on FLAC files.

This also fixes the weird behavior to consider tags supported
although the container format is unknown.
2018-04-29 17:18:17 +02:00
Martchus d856fb4c75 Use std::numeric_limits 2018-03-21 20:40:51 +01:00
Martchus 8d91886b14 Improve test output for TagValues 2018-03-11 22:24:57 +01:00
Martchus c0336ed4bb Apply clang-format 2018-03-07 01:17:50 +01:00
Martchus 0e15c74103 Move everything into namespace TagParser 2018-03-06 23:09:15 +01:00
Martchus c875af0ce9 Use CPPUNIT_ASSERT_EQUAL 2018-03-06 22:44:01 +01:00
Martchus 36511fcc13 Add progress feedback and diagnostics replacing status provider 2018-03-06 22:44:01 +01:00
Martchus e705de3704 Handle Mkv files with unknown element sizes correctly
Those elements are still assumed to fill the max available
space. However, if it turns out one "child" is more likely
a sibling, the wrong assumption is fixed.
2018-03-06 22:44:01 +01:00
Martchus 74054e6e87 Fix default timecode scale in Matroska 2018-02-05 00:11:28 +01:00
Martchus 24a6053c2f Make utilities test work with relative working dir 2018-02-04 23:57:04 +01:00
Martchus 5c4de0909a Adjust tests to handle all notifications being present again 2017-09-14 22:31:32 +02:00
Martchus 6eb8eaab11 tests: Check whether no cricical notifications or warnings occurred 2017-09-14 18:16:00 +02:00
Martchus ab9ab4ba48 Add missing class descriptions 2017-08-29 01:35:45 +02:00
Martchus 9ae903f247 Add note about matroska_wave1/test4.mkv 2017-08-17 20:39:55 +02:00
Martchus 1b96ab15fd Test utilities 2017-08-17 18:44:34 +02:00
Martchus 3924b5f56b Test more methods of MediaFileInfo 2017-08-17 18:44:11 +02:00
Martchus b9fb3c9695 Move test helper in its own namespace 2017-08-17 18:40:34 +02:00
Martchus c120b117c0 Fix tests 2017-06-19 13:54:23 +02:00
Martchus 6741e9ca0f Set Matroska track meta-data when element not present 2017-06-14 22:46:33 +02:00
Martchus 9b0d74b6ad Implement applying changed track meta-data for Mkv 2017-06-11 22:57:28 +02:00
Martchus 8d08314e3b Introduce MatroskaTrackHeaderMaker
First step to implement applying changed track
meta-data for Matroska
2017-06-11 01:21:56 +02:00
Martchus 646fc4d302 Fix TagValue::toInteger() from Latin1/UTF-8 str 2017-06-08 00:48:10 +02:00
Martchus 381d8db895 Fix check for removed tests in Mkv tests 2017-06-07 23:40:02 +02:00
Martchus b03273da44 Allow setting track meta-data
Currently applying is only implemented for
MP4 tracks (only ID, name and language).
2017-06-06 23:26:20 +02:00
Martchus 4e59ed2742 Mind encoding in TagValue::toStandardGenreIndex() 2017-06-03 21:00:36 +02:00
Martchus 5e91661de3 Test TagValue 2017-06-03 21:00:26 +02:00
Martchus b88672e32f Fix compiling tests under 32-bit arch 2017-05-30 23:59:23 +02:00
Martchus f849c22bad Test writing MP4 chunk-by-chunk
This feature was only implemented to play
around with MP4 a little bit and is not actually
used by the tag editor and hence was not tested
very well.
2017-05-29 00:56:26 +02:00
Martchus 32f4c7641c tests: Create cpp file for helper 2017-05-24 19:33:11 +02:00
Martchus ae6bd9522c tests: Do not check files converted via ffmpeg 2017-05-24 19:24:09 +02:00
Martchus 1f1fb4c302 tests: Check tag and index position 2017-05-23 00:52:56 +02:00
Martchus cbc32890fa Test conversion to ID3v2.4 2017-05-21 00:09:09 +02:00
Martchus 44de1e6b7a tests: Move format specific flags from header 2017-05-20 23:37:33 +02:00
Martchus e925e15533 Improve handling of Unicode and BOM in ID3v2
* Convert UTF-8 text fields automatically to UTF-16
  when version is ID3v2.3 or below
  -> so conversion from ID3v2.4 to ID3v2.3 or below
     doesn't require manual conversion of possibly
     UTF-8 encoded fields
* Don't use magic numbers for ID3v2 encoding byte
* Don't warn about UTF-16 Big Endian with BOM
2017-05-20 23:34:45 +02:00
Martchus 2ed7ea800d Improve overall tests
* Move code for each format in an own file
* Use enum for test mode flags instead of magic
  numbers
2017-05-20 21:19:55 +02:00
Martchus 8629a8fd32 tests: Validate Matroska attachment data 2017-05-20 19:58:00 +02:00
Martchus ee15e08dd9 Test parsing and rewriting nested Mkv tags 2017-05-19 00:05:57 +02:00
Martchus 7747438d94 Test reading Matroska chapters 2017-05-07 21:47:03 +02:00
Martchus 9a94d5480f Add test to verify testfiles via SHA-256 checksum 2017-04-08 18:40:27 +02:00
Martchus d6836fa861 Use unicode character in tests 2016-12-27 23:39:02 +01:00
Martchus d5c8086230 Improve misc details 2016-08-05 01:46:31 +02:00
Martchus 8663dedf8c Fix misc issues 2016-07-30 22:35:46 +02:00
Martchus 7e058f289c Improve API doc 2016-06-15 22:53:39 +02:00
Martchus 0dc6d59240 Calculate duration of FLAC streams 2016-05-22 22:27:36 +02:00
Martchus 53f0903c3b Add tests for FLAC files 2016-05-21 22:11:08 +02:00
Martchus ec3c12d222 delete working copies when test has been completed 2016-05-01 20:04:01 +02:00
Martchus 0395e2c487 added tests for overall MP3, MP4 and OGG parsing/making 2016-03-22 22:54:04 +01:00
Martchus 2af5ce997b added tests for Matroska parsing/making 2016-03-15 15:44:44 +01:00
Martchus 488fce3ab8 parsing AVC config 2016-02-17 20:19:05 +01:00