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