15 m_testTitle.
assignText(
"some title"sv, TagTextEncoding::Utf8);
16 m_testComment.
assignText(
"some cómment"sv, TagTextEncoding::Utf8);
17 m_testComment.
setDescription(
"some descriptión"sv, TagTextEncoding::Utf8);
18 m_testCommentWithoutDescription.
assignText(
"some cómment"sv, TagTextEncoding::Utf8);
19 m_testAlbum.
assignText(
"some album"sv, TagTextEncoding::Utf8);
32void OverallTests::parseFile(
const string &path,
void (
OverallTests::*checkRoutine)(
void))
35 cerr <<
"- testing " << path << endl;
42 (this->*checkRoutine)();
50void OverallTests::makeFile(
const string &path,
void (
OverallTests::*modifyRoutine)(
void),
void (
OverallTests::*checkRoutine)(
void))
53 cerr <<
"- testing " << path << endl;
62 case ContainerFormat::Mp4:
64 if (m_fileInfo.
tagPosition() != ElementPosition::Keep) {
68 if (m_expectedTagPos == ElementPosition::Keep) {
75 case ContainerFormat::Matroska:
78 if (m_fileInfo.
tagPosition() != ElementPosition::Keep) {
86 if (m_fileInfo.
indexPosition() != ElementPosition::Keep && m_expectedIndexPos != ElementPosition::Keep) {
94 (this->*modifyRoutine)();
100 (this->*checkRoutine)();
103 case ContainerFormat::Matroska:
104 checkMkvConstraints();
106 case ContainerFormat::Mp4:
107 checkMp4Constraints();
109 case ContainerFormat::MpegAudioFrames:
110 case ContainerFormat::Adts:
111 checkMp3PaddingConstraints();
118 remove(path.c_str());
119 remove((path +
".bak").c_str());
125void OverallTests::removeAllTags()
134void OverallTests::noop()
141void OverallTests::removeSecondTrack()
The OverallTests class tests reading and writing tags and parsing technical information for all suppo...
void setUp() override
Creates some test meta data.
The AbortableProgressFeedback class provides feedback about an ongoing operation via callbacks.
virtual bool removeTrack(AbstractTrack *track)
Removes the specified track to the container.
virtual ElementPosition determineTagPosition(Diagnostics &diag) const
Determines the position of the tags inside the file.
virtual AbstractTrack * track(std::size_t index)
Returns the track with the specified index.
virtual ElementPosition determineIndexPosition(Diagnostics &diag) const
Determines the position of the index.
virtual std::size_t trackCount() const
Returns the number of tracks the container holds.
void reopen(bool readOnly=false)
Opens a std::fstream for the current file.
void close()
A possibly opened std::fstream will be closed.
void setPath(std::string_view path)
Sets the current file.
void assignText(const char *text, std::size_t textSize, TagTextEncoding textEncoding=TagTextEncoding::Latin1, TagTextEncoding convertTo=TagTextEncoding::Unspecified)
Assigns a copy of the given text.
void assignInteger(int value)
Assigns the given integer value.
void assignPosition(PositionInSet value)
Assigns the given PositionInSet value.
void setDescription(std::string_view value, TagTextEncoding encoding=TagTextEncoding::Latin1)
Sets the description.
CPPUNIT_TEST_SUITE_REGISTRATION(OverallTests)