Tag Parser 12.1.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"
8#include "../progressfeedback.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);
48 CPPUNIT_TEST(testMp3Making);
49 CPPUNIT_TEST(testOggMaking);
50 CPPUNIT_TEST(testFlacMaking);
52 CPPUNIT_TEST(testMkvMakingNestedTags);
53 CPPUNIT_TEST_SUITE_END();
54
55public:
57
58 void setUp() override;
59 void tearDown() override;
60
61private:
62 void parseFile(const string &path, void (OverallTests::*checkRoutine)(void));
63 void makeFile(const string &path, void (OverallTests::*modifyRoutine)(void), void (OverallTests::*checkRoutine)(void));
64
65 void checkMkvTestfile1();
66 void checkMkvTestfile2();
67 void checkMkvTestfile3();
68 void checkMkvTestfile4();
69 void checkMkvTestfile5();
70 void checkMkvTestfile6();
71 void checkMkvTestfile7();
72 void checkMkvTestfile8();
73 void checkMkvTestfileHandbrakeChapters();
74 void checkMkvTestfileNestedTags();
75 void checkMkvTestMetaData();
76 void checkMkvConstraints();
77
78 void checkMp4Testfile1();
79 void checkMp4Testfile2();
80 void checkMp4Testfile3();
81 void checkMp4Testfile4();
82 void checkMp4Testfile5();
83 void checkMp4Testfile6();
84 void checkMp4Testfile7();
85 void checkMp4TestMetaData();
86 void checkMp4Constraints();
87
88 void checkMp3Testfile1();
89 void checkMp3Testfile2();
90 void checkMp3TestMetaData();
91 void checkMp3PaddingConstraints();
92
93 void checkOggTestfile1();
94 void checkOggTestfile2();
95 void checkOggTestfile3();
96 void checkOggTestMetaData();
97 void checkOggTestMetaDataCover();
98
99 void checkFlacTestfile1();
100 void checkFlacTestfile2();
101
102 void setMkvTestMetaData();
103 void setMp4TestMetaData();
104 void setMp3TestMetaData1();
105 void setMp3TestMetaData2();
106 void setOggTestMetaData();
107 void setOggTestMetaDataCover();
108 void removeAllTags();
109 void noop();
110 void alterMp4Tracks();
111 void removeSecondTrack();
112
113public:
114 void testMkvParsing();
115 void testMp4Parsing();
116 void testMp3Parsing();
117 void testOggParsing();
118 void testFlacParsing();
121 void testMp4Making();
122 void testMp3Making();
123 void testOggMaking();
124 void testFlacMaking();
125
126private:
127 MediaFileInfo m_fileInfo;
128 MediaFileInfo m_additionalFileInfo;
129 Diagnostics m_diag;
130 AbortableProgressFeedback m_progress;
131 TagValue m_testTitle;
132 TagValue m_testComment;
133 TagValue m_testCommentWithoutDescription;
134 TagValue m_testAlbum;
135 TagValue m_testPartNumber;
136 TagValue m_testTotalParts;
137 TagValue m_testPosition;
138 string m_testCover;
139 queue<TagValue> m_preservedMetaData;
140 TagStatus m_tagStatus;
141 std::uint16_t m_mode;
142 ElementPosition m_expectedTagPos;
143 ElementPosition m_expectedIndexPos;
144};
145
146#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 testFlacParsing()
Tests the FLAC parser via MediaFileInfo.
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.
Definition tagvalue.h:147
Contains all classes and functions of the TagInfo library.
Definition aaccodebook.h:10
ElementPosition
Definition settings.h:13
TagStatus
Definition overall.h:28
@ TestMetaDataPresent