Tag Parser 12.4.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
Loading...
Searching...
No Matches
overall.h
Go to the documentation of this file.
1#ifndef TAGPARSER_OVERALL_TESTS_H
2#define TAGPARSER_OVERALL_TESTS_H
3
4#include "./helper.h"
5
6#include "../diagnostics.h"
7#include "../mediafileinfo.h"
9#include "../tagvalue.h"
10
11#include <c++utilities/chrono/datetime.h>
12#include <c++utilities/chrono/format.h>
13#include <c++utilities/conversion/stringconversion.h>
14#include <c++utilities/tests/testutils.h>
15using namespace CppUtilities;
16
17#include <cppunit/TestFixture.h>
18#include <cppunit/extensions/HelperMacros.h>
19
20#include <queue>
21#include <string>
22
23using namespace std;
24using namespace CppUtilities::Literals;
25using namespace TagParser;
26using namespace CPPUNIT_NS;
27
29
30namespace SimpleTestFlags {
32 RemoveTag = 0x1,
33};
34}
35
40class OverallTests : public TestFixture {
41 CPPUNIT_TEST_SUITE(OverallTests);
42 CPPUNIT_TEST(testMp4Parsing);
43 CPPUNIT_TEST(testMp3Parsing);
44 CPPUNIT_TEST(testOggParsing);
45 CPPUNIT_TEST(testFlacParsing);
46 CPPUNIT_TEST(testMkvParsing);
47 CPPUNIT_TEST(testMp4Making);
49 CPPUNIT_TEST(testMp3Making);
50 CPPUNIT_TEST(testOggMaking);
51 CPPUNIT_TEST(testFlacMaking);
53 CPPUNIT_TEST(testMkvMakingNestedTags);
55 CPPUNIT_TEST_SUITE_END();
56
57public:
59
60 void setUp() override;
61 void tearDown() override;
62
63private:
64 void parseFile(const string &path, void (OverallTests::*checkRoutine)(void));
65 void makeFile(const string &path, void (OverallTests::*modifyRoutine)(void), void (OverallTests::*checkRoutine)(void));
66
67 void checkMkvTestfile1();
68 void checkMkvTestfile2();
69 void checkMkvTestfile3();
70 void checkMkvTestfile4();
71 void checkMkvTestfile5();
72 void checkMkvTestfile6();
73 void checkMkvTestfile7();
74 void checkMkvTestfile8();
75 void checkMkvTestfileHandbrakeChapters();
76 void checkMkvTestfileNestedTags();
77 void checkMkvTestMetaData();
78 void checkMkvConstraints();
79
80 void checkMp4Testfile1();
81 void checkMp4Testfile2();
82 void checkMp4Testfile3();
83 void checkMp4Testfile4();
84 void checkMp4Testfile5();
85 void checkMp4Testfile6();
86 void checkMp4Testfile7();
87 void checkMp4TestMetaData();
88 void checkMp4Constraints();
89
90 void checkMp3Testfile1();
91 void checkMp3Testfile2();
92 void checkMp3TestMetaData();
93 void checkMp3PaddingConstraints();
94
95 void checkOggTestfile1();
96 void checkOggTestfile2();
97 void checkOggTestfile3();
98 void checkOggTestMetaData();
99 void checkOggTestMetaDataCover();
100
101 void checkFlacTestfile1();
102 void checkFlacTestfile2();
103
104 void setMkvTestMetaData();
105 void setMp4TestMetaData();
106 void setMp3TestMetaData1();
107 void setMp3TestMetaData2();
108 void setOggTestMetaData();
109 void setOggTestMetaDataCover();
110 void removeAllTags();
111 void noop();
112 void alterMp4Tracks();
113 void removeSecondTrack();
114
115public:
116 void testMkvParsing();
117 void testMp4Parsing();
118 void testMp3Parsing();
119 void testOggParsing();
120 void testFlacParsing();
123 void testMp4Making();
125 void testMp3Making();
126 void testOggMaking();
127 void testFlacMaking();
129
130private:
131 MediaFileInfo m_fileInfo;
132 MediaFileInfo m_additionalFileInfo;
133 Diagnostics m_diag;
134 AbortableProgressFeedback m_progress;
135 TagValue m_testTitle;
136 TagValue m_testComment;
137 TagValue m_testCommentWithoutDescription;
138 TagValue m_testAlbum;
139 TagValue m_testPartNumber;
140 TagValue m_testTotalParts;
141 TagValue m_testPosition;
142 string m_testCover;
143 queue<TagValue> m_preservedMetaData;
144 TagStatus m_tagStatus;
145 std::uint16_t m_mode;
146 ElementPosition m_expectedTagPos;
147 ElementPosition m_expectedIndexPos;
148};
149
150#endif // TAGPARSER_OVERALL_TESTS_H
The OverallTests class tests reading and writing tags and parsing technical information for all suppo...
Definition overall.h:40
void testMp3Parsing()
Tests the MP3 parser via MediaFileInfo.
void testOggParsing()
Tests the Ogg parser via MediaFileInfo.
void testMp3Making()
Tests the MP3 maker via MediaFileInfo.
void setUp() override
Creates some test meta data.
void testMp4MakingWith64BitOffsets()
Tests the MP4 maker via MediaFileInfo with a big padding to require 64-bit chunk offsets.
void testFlacParsing()
Tests the FLAC parser via MediaFileInfo.
void testVorbisCommentFieldHandling()
Tests the Vorbis Comment specifc handling of certain fields done in VorbisComment::convertTotalFields...
void testFlacMaking()
Tests the FLAC maker via MediaFileInfo.
void testMp4Making()
Tests the MP4 maker via MediaFileInfo.
void tearDown() override
void testMkvMakingNestedTags()
Tests making a Matroska file with nested tags via MediaFileInfo.
void testMp4Parsing()
Tests the MP4 parser via MediaFileInfo.
void testMkvParsing()
Tests the Matroska parser via MediaFileInfo.
void testMkvMakingWithDifferentSettings()
Tests the Matroska maker via MediaFileInfo.
void testOggMaking()
Tests the Ogg maker via MediaFileInfo.
The AbortableProgressFeedback class provides feedback about an ongoing operation via callbacks.
The Diagnostics class is a container for DiagMessage.
The MediaFileInfo class allows to read and write tag information providing a container/tag format ind...
The TagValue class wraps values of different types.
Contains all classes and functions of the TagInfo library.
Definition aaccodebook.h:10
ElementPosition
Definition settings.h:13
TagStatus
Definition overall.h:28
@ TestMetaDataPresent