31 void OverallTests::parseFile(
const string &path,
void (
OverallTests::*checkRoutine)(
void))
34 cerr <<
"- testing " << path << endl;
41 (this->*checkRoutine)();
49 void OverallTests::makeFile(
const string &path,
void (
OverallTests::*modifyRoutine)(
void),
void (
OverallTests::*checkRoutine)(
void))
52 cerr <<
"- testing " << path << endl;
63 if (m_fileInfo.
tagPosition() != ElementPosition::Keep) {
67 if (m_expectedTagPos == ElementPosition::Keep) {
74 case ContainerFormat::Matroska:
77 if (m_fileInfo.
tagPosition() != ElementPosition::Keep) {
85 if (m_fileInfo.
indexPosition() != ElementPosition::Keep && m_expectedIndexPos != ElementPosition::Keep) {
93 (this->*modifyRoutine)();
99 (this->*checkRoutine)();
102 case ContainerFormat::Matroska:
103 checkMkvConstraints();
106 checkMp4Constraints();
110 checkMp3PaddingConstraints();
117 remove(path.c_str());
118 remove((path +
".bak").c_str());
124 void OverallTests::removeAllTags()
133 void OverallTests::noop()
140 void OverallTests::removeSecondTrack()
void setPath(const std::string &path)
Sets the current file.
virtual ElementPosition determineTagPosition(Diagnostics &diag) const
Determines the position of the tags inside the file.
CPPUNIT_TEST_SUITE_REGISTRATION(OverallTests)
virtual ElementPosition determineIndexPosition(Diagnostics &diag) const
Determines the position of the index.
The PositionInSet class describes the position of an element in a set which consists of a certain num...
virtual std::size_t trackCount() const
Returns the number of tracks the container holds.
void assignPosition(PositionInSet value)
Assigns the given PositionInSet value.
The OverallTests class tests reading and writing tags and parsing technical information for all suppo...
void reopen(bool readonly=false)
Opens a std::fstream for the current file.
The AbortableProgressFeedback class provides feedback about an ongoing operation via callbacks...
void close()
A possibly opened std::fstream will be closed.
void assignInteger(int value)
Assigns the given integer value.
void assignText(const char *text, std::size_t textSize, TagTextEncoding textEncoding=TagTextEncoding::Latin1, TagTextEncoding convertTo=TagTextEncoding::Unspecified)
Assigns a copy of the given text.
virtual AbstractTrack * track(std::size_t index)
Returns the track with the specified index.
void setDescription(const std::string &value, TagTextEncoding encoding=TagTextEncoding::Latin1)
Sets the description.
virtual bool removeTrack(AbstractTrack *track)
Removes the specified track to the container.
void setUp()
Creates some test meta data.