Tag Parser 11.3.0
C++ library for reading and writing MP4 (iTunes), ID3, Vorbis, Opus, FLAC and Matroska tags
tagvalue.cpp
Go to the documentation of this file.
1#include "./helper.h"
2
3#include "../id3/id3genres.h"
4#include "../tagvalue.h"
5
6#include <c++utilities/chrono/format.h>
7#include <c++utilities/conversion/conversionexception.h>
8
9using namespace CppUtilities;
10
11#include <cppunit/TestFixture.h>
12#include <cppunit/extensions/HelperMacros.h>
13
14using namespace std;
15using namespace CppUtilities;
16using namespace TagParser;
17using namespace CPPUNIT_NS;
18
22class TagValueTests : public TestFixture {
23 CPPUNIT_TEST_SUITE(TagValueTests);
24 CPPUNIT_TEST(testBasics);
25 CPPUNIT_TEST(testBinary);
26 CPPUNIT_TEST(testInteger);
27 CPPUNIT_TEST(testUnsignedInteger);
28 CPPUNIT_TEST(testPositionInSet);
29 CPPUNIT_TEST(testTimeSpan);
30 CPPUNIT_TEST(testDateTime);
31 CPPUNIT_TEST(testPopularity);
32 CPPUNIT_TEST(testString);
33 CPPUNIT_TEST(testEqualityOperator);
34 CPPUNIT_TEST_SUITE_END();
35
36public:
37 void setUp() override;
38 void tearDown() override;
39
40 void testBasics();
41 void testBinary();
42 void testInteger();
44 void testPositionInSet();
45 void testTimeSpan();
46 void testDateTime();
47 void testPopularity();
48 void testString();
50};
51
53
55{
56}
57
59{
60}
61
63{
64 CPPUNIT_ASSERT(TagValue::empty().isEmpty());
65 CPPUNIT_ASSERT_EQUAL(TagDataType::Undefined, TagValue().type());
66}
67
69{
70 const TagValue binary("123", 3, TagDataType::Binary);
71 CPPUNIT_ASSERT_EQUAL(TagDataType::Binary, binary.type());
72 CPPUNIT_ASSERT_EQUAL("123"s, string(binary.dataPointer(), binary.dataSize()));
73 CPPUNIT_ASSERT_THROW(binary.toString(), ConversionException);
74 CPPUNIT_ASSERT_THROW(binary.toInteger(), ConversionException);
75 CPPUNIT_ASSERT_THROW(binary.toPositionInSet(), ConversionException);
76 CPPUNIT_ASSERT_THROW(binary.toStandardGenreIndex(), ConversionException);
77}
78
80{
81 // positive number
82 auto integer = TagValue(42);
83 CPPUNIT_ASSERT(!integer.isEmpty());
84 CPPUNIT_ASSERT_EQUAL(TagDataType::Integer, integer.type());
85 CPPUNIT_ASSERT_EQUAL(static_cast<std::int32_t>(42), integer.toInteger());
86 CPPUNIT_ASSERT_EQUAL(static_cast<std::uint64_t>(42), integer.toUnsignedInteger());
87 CPPUNIT_ASSERT_EQUAL("42"s, integer.toString());
88 integer.assignInteger(2);
89 CPPUNIT_ASSERT_EQUAL("Country"s, string(Id3Genres::stringFromIndex(integer.toStandardGenreIndex())));
90 integer.assignInteger(Id3Genres::emptyGenreIndex());
91 CPPUNIT_ASSERT_EQUAL(Id3Genres::emptyGenreIndex(), integer.toStandardGenreIndex());
92 integer.clearData();
93 CPPUNIT_ASSERT_EQUAL(Id3Genres::emptyGenreIndex(), integer.toStandardGenreIndex());
94
95 // negative number
96 integer.assignInteger(-25);
97 CPPUNIT_ASSERT_EQUAL("-25"s, integer.toString());
98 CPPUNIT_ASSERT_EQUAL(PositionInSet(-25), integer.toPositionInSet());
99 CPPUNIT_ASSERT_THROW(integer.toStandardGenreIndex(), ConversionException);
100
101 // zero
102 integer.assignInteger(0);
103 CPPUNIT_ASSERT_MESSAGE("explicitly assigned zero not considered empty", !integer.isEmpty());
104 CPPUNIT_ASSERT_EQUAL("0"s, integer.toString());
105 CPPUNIT_ASSERT_EQUAL(DateTime(), integer.toDateTime());
106 CPPUNIT_ASSERT_EQUAL(TimeSpan(), integer.toTimeSpan());
107
108 // empty value treatet as zero when using to...() methods
109 integer.clearData();
110 CPPUNIT_ASSERT_MESSAGE("cleared vale considered empty", integer.isEmpty());
111 CPPUNIT_ASSERT_EQUAL_MESSAGE("only date (but not type) cleared"s, TagDataType::Integer, integer.type());
112 CPPUNIT_ASSERT_EQUAL(static_cast<std::int32_t>(0), integer.toInteger());
113 CPPUNIT_ASSERT_EQUAL(static_cast<std::uint64_t>(0), integer.toUnsignedInteger());
114 CPPUNIT_ASSERT_EQUAL(string(), integer.toString());
115 CPPUNIT_ASSERT_EQUAL(DateTime(), integer.toDateTime());
116 CPPUNIT_ASSERT_EQUAL(TimeSpan(), integer.toTimeSpan());
117}
118
120{
121 auto unsignedInteger = TagValue(static_cast<std::uint64_t>(42ul));
122 CPPUNIT_ASSERT(!unsignedInteger.isEmpty());
123 CPPUNIT_ASSERT_EQUAL(TagDataType::UnsignedInteger, unsignedInteger.type());
124 CPPUNIT_ASSERT_EQUAL(static_cast<std::int32_t>(42), unsignedInteger.toInteger());
125 CPPUNIT_ASSERT_EQUAL(static_cast<std::uint64_t>(42), unsignedInteger.toUnsignedInteger());
126 CPPUNIT_ASSERT_EQUAL("42"s, unsignedInteger.toString());
127 unsignedInteger.assignUnsignedInteger(2);
128 CPPUNIT_ASSERT_EQUAL("Country"s, string(Id3Genres::stringFromIndex(unsignedInteger.toStandardGenreIndex())));
129 unsignedInteger.assignInteger(Id3Genres::emptyGenreIndex());
130 CPPUNIT_ASSERT_EQUAL(Id3Genres::emptyGenreIndex(), unsignedInteger.toStandardGenreIndex());
131 unsignedInteger.clearData();
132 CPPUNIT_ASSERT_EQUAL(Id3Genres::emptyGenreIndex(), unsignedInteger.toStandardGenreIndex());
133
134 // zero
135 unsignedInteger.assignInteger(0);
136 CPPUNIT_ASSERT_MESSAGE("explicitly assigned zero not considered empty", !unsignedInteger.isEmpty());
137 CPPUNIT_ASSERT_EQUAL("0"s, unsignedInteger.toString());
138 CPPUNIT_ASSERT_EQUAL(DateTime(), unsignedInteger.toDateTime());
139 CPPUNIT_ASSERT_EQUAL(TimeSpan(), unsignedInteger.toTimeSpan());
140}
141
143{
144 const TagValue test(PositionInSet(4, 23));
145 CPPUNIT_ASSERT_EQUAL(PositionInSet(4, 23), test.toPositionInSet());
146 CPPUNIT_ASSERT_EQUAL(4, test.toInteger());
147 CPPUNIT_ASSERT_EQUAL(static_cast<std::uint64_t>(4), test.toUnsignedInteger());
148 CPPUNIT_ASSERT_EQUAL("4/23"s, test.toString());
149 CPPUNIT_ASSERT_THROW(test.toStandardGenreIndex(), ConversionException);
150 CPPUNIT_ASSERT_THROW(test.toDateTime(), ConversionException);
151 CPPUNIT_ASSERT_THROW(test.toTimeSpan(), ConversionException);
152}
153
155{
156 const TimeSpan fiveMinutes(TimeSpan::fromMinutes(5));
157 TagValue timeSpan;
158 timeSpan.assignTimeSpan(fiveMinutes);
159 CPPUNIT_ASSERT_EQUAL(timeSpan, TagValue(timeSpan));
160 CPPUNIT_ASSERT_EQUAL(fiveMinutes, timeSpan.toTimeSpan());
161 CPPUNIT_ASSERT_EQUAL(fiveMinutes.toString(), timeSpan.toString());
162 CPPUNIT_ASSERT_THROW(timeSpan.toInteger(), ConversionException);
163 CPPUNIT_ASSERT_THROW(timeSpan.toDateTime(), ConversionException);
164 CPPUNIT_ASSERT_THROW(timeSpan.toPositionInSet(), ConversionException);
165}
166
168{
169 const DateTime now(DateTime::now());
170 TagValue dateTime;
171 dateTime.assignDateTime(now);
172 CPPUNIT_ASSERT_EQUAL(dateTime, TagValue(dateTime));
173 CPPUNIT_ASSERT_EQUAL(now, dateTime.toDateTime());
174 CPPUNIT_ASSERT_EQUAL(now.toString(DateTimeOutputFormat::IsoOmittingDefaultComponents), dateTime.toString());
175 CPPUNIT_ASSERT_THROW(dateTime.toInteger(), ConversionException);
176 CPPUNIT_ASSERT_THROW(dateTime.toTimeSpan(), ConversionException);
177 CPPUNIT_ASSERT_THROW(dateTime.toPositionInSet(), ConversionException);
178}
179
181{
182 const auto tagValue = TagValue(Popularity{ .user = "foo", .rating = 42, .playCounter = 123, .scale = TagType::VorbisComment });
183 const auto popularity = tagValue.toPopularity();
184 CPPUNIT_ASSERT_EQUAL_MESSAGE("conversion to popularity (user)", "foo"s, popularity.user);
185 CPPUNIT_ASSERT_EQUAL_MESSAGE("conversion to popularity (rating)", 42.0, popularity.rating);
186 CPPUNIT_ASSERT_EQUAL_MESSAGE("conversion to popularity (play counter)", std::uint64_t(123), popularity.playCounter);
187 CPPUNIT_ASSERT_EQUAL_MESSAGE("conversion to popularity (scale)", TagType::VorbisComment, popularity.scale);
188 CPPUNIT_ASSERT_EQUAL_MESSAGE("conversion to string", "foo|42|123"s, tagValue.toString());
189 CPPUNIT_ASSERT_EQUAL_MESSAGE("conversion to string (only rating)", "43"s, TagValue(Popularity{ .rating = 43 }).toString());
190 CPPUNIT_ASSERT_EQUAL_MESSAGE("conversion to integer", 42, tagValue.toInteger());
191 CPPUNIT_ASSERT_EQUAL_MESSAGE("conversion to unsigned integer", static_cast<std::uint64_t>(42), tagValue.toUnsignedInteger());
192 CPPUNIT_ASSERT_THROW_MESSAGE(
193 "failing conversion to other type", TagValue("foo|bar"sv, TagTextEncoding::Latin1).toPopularity(), ConversionException);
194}
195
197{
198 CPPUNIT_ASSERT_EQUAL("15\xe4"s, TagValue("15ä", 4, TagTextEncoding::Utf8).toString(TagTextEncoding::Latin1));
199 CPPUNIT_ASSERT_EQUAL("15\xe4"s, TagValue("15ä", TagTextEncoding::Utf8, TagTextEncoding::Latin1).toString());
200 CPPUNIT_ASSERT_EQUAL("15ä"s, TagValue("15ä", 4, TagTextEncoding::Utf8).toString(TagTextEncoding::Utf8));
201 CPPUNIT_ASSERT_EQUAL("\x31\0\x35\0"s, TagValue(15).toString(TagTextEncoding::Utf16LittleEndian));
202 CPPUNIT_ASSERT_EQUAL("\0\x31\0\x35"s, TagValue(15).toString(TagTextEncoding::Utf16BigEndian));
203 CPPUNIT_ASSERT_EQUAL(15, TagValue("\0\x31\0\x35"s, TagTextEncoding::Utf16BigEndian).toInteger());
204 CPPUNIT_ASSERT_EQUAL(static_cast<std::uint64_t>(15), TagValue("\0\x31\0\x35"s, TagTextEncoding::Utf16BigEndian).toUnsignedInteger());
205 CPPUNIT_ASSERT_EQUAL_MESSAGE(
206 "original encoding preserved", "15ä"s, TagValue("15ä", 4, TagTextEncoding::Utf8).toString(TagTextEncoding::Unspecified));
207 CPPUNIT_ASSERT_EQUAL_MESSAGE("original encoding preserved", "\0\x31\0\x35"s,
208 TagValue("\0\x31\0\x35", 4, TagTextEncoding::Utf16BigEndian).toString(TagTextEncoding::Unspecified));
209 CPPUNIT_ASSERT_EQUAL_MESSAGE(
210 "UTF-8 BOM truncated", "täst"s, TagValue("\xef\xbb\xbftäst", 8, TagTextEncoding::Utf8).toString(TagTextEncoding::Unspecified));
211 CPPUNIT_ASSERT_EQUAL_MESSAGE("UTF-16 LE BOM truncated", "\0t\0\xe4\0s\0t"s,
212 TagValue("\xff\xfe\0t\0\xe4\0s\0t", 10, TagTextEncoding::Utf16LittleEndian).toString(TagTextEncoding::Unspecified));
213 CPPUNIT_ASSERT_EQUAL_MESSAGE("UTF-16 BE BOM truncated", "t\0\xe4\0s\0t\0"s,
214 TagValue("\xfe\xfft\0\xe4\0s\0t\0", 10, TagTextEncoding::Utf16BigEndian).toString(TagTextEncoding::Unspecified));
215 CPPUNIT_ASSERT_EQUAL_MESSAGE("conversion via c'tor", "15\xe4"s,
216 TagValue("\xef\xbb\xbf\x31\x35ä", 7, TagTextEncoding::Utf8, TagTextEncoding::Latin1).toString(TagTextEncoding::Unspecified));
217 CPPUNIT_ASSERT_EQUAL_MESSAGE("conversion to int", -15, TagValue(" - 156", 5, TagTextEncoding::Utf8).toInteger());
218 CPPUNIT_ASSERT_EQUAL_MESSAGE("conversion to int", 15, TagValue("\0\x31\0\x35", 4, TagTextEncoding::Utf16BigEndian).toInteger());
219 CPPUNIT_ASSERT_THROW_MESSAGE("failing conversion to int", TagValue("15ä", 4, TagTextEncoding::Utf8).toInteger(), ConversionException);
220 CPPUNIT_ASSERT_EQUAL_MESSAGE("conversion to pos", PositionInSet(4, 15), TagValue("4 / 15", 6, TagTextEncoding::Utf8).toPositionInSet());
221 CPPUNIT_ASSERT_EQUAL_MESSAGE(
222 "conversion to pos", PositionInSet(15), TagValue("\0\x31\0\x35", 4, TagTextEncoding::Utf16BigEndian).toPositionInSet());
223 CPPUNIT_ASSERT_THROW_MESSAGE("failing conversion pos", TagValue("a4 / 15", 7, TagTextEncoding::Utf8).toPositionInSet(), ConversionException);
224 CPPUNIT_ASSERT_EQUAL_MESSAGE(
225 "conversion to date", DateTime::fromDate(2004, 4, 15), TagValue("2004-04-15", 10, TagTextEncoding::Utf8).toDateTime());
226 CPPUNIT_ASSERT_EQUAL_MESSAGE("conversion to date from UTF-16", DateTime::fromDate(2015, 4, 15),
227 TagValue("\0\x32\0\x30\0\x31\0\x35\0\x2d\0\x30\0\x34\0\x2d\0\x31\0\x35", 20, TagTextEncoding::Utf16BigEndian).toDateTime());
228 CPPUNIT_ASSERT_THROW_MESSAGE("failing conversion to date", TagValue("_", 1, TagTextEncoding::Utf8).toDateTime(), ConversionException);
229 CPPUNIT_ASSERT_EQUAL_MESSAGE("conversion to time span", TimeSpan::fromHours(1.5), TagValue("01:30:00", 10, TagTextEncoding::Utf8).toTimeSpan());
230 CPPUNIT_ASSERT_EQUAL_MESSAGE("conversion to time span from UTF-16", TimeSpan::fromHours(1.5),
231 TagValue("\0\x31\0\x3a\0\x33\0\x30\0\x3a\0\x30\0\x30", 14, TagTextEncoding::Utf16BigEndian).toTimeSpan());
232 CPPUNIT_ASSERT_THROW_MESSAGE("failing conversion to time span", TagValue("_", 1, TagTextEncoding::Utf8).toTimeSpan(), ConversionException);
233 CPPUNIT_ASSERT_EQUAL_MESSAGE(
234 "conversion to genre from index", 15, TagValue("\0\x31\0\x35", 4, TagTextEncoding::Utf16BigEndian).toStandardGenreIndex());
235 CPPUNIT_ASSERT_EQUAL_MESSAGE("conversion to genre from name", 2, TagValue("Country", 7, TagTextEncoding::Latin1).toStandardGenreIndex());
236 CPPUNIT_ASSERT_THROW_MESSAGE(
237 "failing conversion to genre", TagValue("Kountry", 7, TagTextEncoding::Latin1).toStandardGenreIndex(), ConversionException);
238 const auto popularity = TagValue("foo|42|123"sv).toPopularity();
239 CPPUNIT_ASSERT_EQUAL_MESSAGE("conversion to popularity (user)", "foo"s, popularity.user);
240 CPPUNIT_ASSERT_EQUAL_MESSAGE("conversion to popularity (rating)", 42.0, popularity.rating);
241 CPPUNIT_ASSERT_EQUAL_MESSAGE("conversion to popularity (play counter)", std::uint64_t(123), popularity.playCounter);
242 CPPUNIT_ASSERT_THROW_MESSAGE("failing conversion to popularity", TagValue("foo|bar"sv).toPopularity(), ConversionException);
243}
244
246{
247 CPPUNIT_ASSERT_MESSAGE("equality requires identical types or identical string representation"s, TagValue(0) != TagValue::empty());
248 CPPUNIT_ASSERT_EQUAL_MESSAGE("comparison of equal types"s, TagValue(15), TagValue(15));
249 CPPUNIT_ASSERT_EQUAL_MESSAGE("types might differ"s, TagValue("15", 2, TagTextEncoding::Latin1), TagValue(15));
250 CPPUNIT_ASSERT_MESSAGE("but some types shall never be considered equal"s, TagValue(DateTime(0)) != TagValue(TimeSpan(0)));
251 CPPUNIT_ASSERT_EQUAL_MESSAGE("comparison of equal UTF-16 strings"s, TagValue("\x31\0\x32\0", 4, TagTextEncoding::Utf16LittleEndian),
252 TagValue("\x31\0\x32\0", 4, TagTextEncoding::Utf16LittleEndian));
253 CPPUNIT_ASSERT_MESSAGE("comparison of different UTF-16 strings"s,
254 TagValue("\x31\0\x33\0", 4, TagTextEncoding::Utf16LittleEndian) != TagValue("\x31\0\x32\0", 4, TagTextEncoding::Utf16LittleEndian));
255 CPPUNIT_ASSERT_EQUAL_MESSAGE(
256 "comparison of equal binary data"s, TagValue("\x31\0\x32\0", 4, TagDataType::Binary), TagValue("\x31\0\x32\0", 4, TagDataType::Binary));
257 CPPUNIT_ASSERT_MESSAGE(
258 "comparison of different binary data"s, TagValue("\x31\0\x33\0", 4, TagDataType::Binary) != TagValue("\x31\0\x32\0", 4, TagDataType::Binary));
259 CPPUNIT_ASSERT_EQUAL_MESSAGE("different encodings are converted if neccassary"s, TagValue("\0\x31\0\x35", 4, TagTextEncoding::Utf16BigEndian),
260 TagValue("15", 2, TagTextEncoding::Latin1));
261 CPPUNIT_ASSERT_EQUAL_MESSAGE(
262 "encoding is ignored when not relevant for types"s, TagValue("\0\x31\0\x35", 4, TagTextEncoding::Utf16BigEndian), TagValue(15));
263 const TagValue fooTagValue("foo", 3, TagDataType::Text), fOoTagValue("fOo", 3, TagDataType::Text);
264 CPPUNIT_ASSERT_MESSAGE("string comparison case-sensitive by default"s, fooTagValue != fOoTagValue);
265 CPPUNIT_ASSERT_MESSAGE("case-insensitive string comparison"s, fooTagValue.compareTo(fOoTagValue, TagValueComparisionFlags::CaseInsensitive));
266 const auto popularity = Popularity{ .user = "some user", .rating = 200, .playCounter = 0 };
267 const auto first = TagValue(popularity), second = TagValue(popularity);
268 CPPUNIT_ASSERT_EQUAL_MESSAGE("comparison of equal popularity (string and binary representation)"s, TagValue("some user|200.0"sv), first);
269 CPPUNIT_ASSERT_EQUAL_MESSAGE("comparison of equal popularity (only binary representation)"s, first, second);
270 CPPUNIT_ASSERT_MESSAGE("default-popularity not equal to empty tag value"s, TagValue(Popularity()) != TagValue());
271 CPPUNIT_ASSERT_MESSAGE("popularity not equal"s, first != TagValue(Popularity({ .rating = 200 })));
272
273 // meta-data
274 TagValue withDescription(15);
275 withDescription.setDescription("test");
276 CPPUNIT_ASSERT_MESSAGE("meta-data must be equal"s, withDescription != TagValue(15));
277 CPPUNIT_ASSERT_MESSAGE("different meta-data ignored"s, withDescription.compareTo(TagValue(15), TagValueComparisionFlags::IgnoreMetaData));
278 TagValue withDescription2(withDescription);
279 CPPUNIT_ASSERT_EQUAL(withDescription, withDescription2);
280 withDescription2.setMimeType("foo/bar");
281 CPPUNIT_ASSERT(withDescription != withDescription2);
282 withDescription.setMimeType(withDescription2.mimeType());
283 CPPUNIT_ASSERT_EQUAL(withDescription, withDescription2);
284 withDescription2.setDescription("Test");
285 CPPUNIT_ASSERT_MESSAGE("meta-data case must match by default"s, withDescription != withDescription2);
286 CPPUNIT_ASSERT_MESSAGE("meta-data case ignored"s, withDescription.compareTo(withDescription2, TagValueComparisionFlags::CaseInsensitive));
287}
The PositionInSet class describes the position of an element in a set which consists of a certain num...
Definition: positioninset.h:21
The TagValue class wraps values of different types.
Definition: tagvalue.h:130
void setMimeType(std::string_view mimeType)
Sets the MIME type.
Definition: tagvalue.h:696
const std::string & mimeType() const
Returns the MIME type.
Definition: tagvalue.h:684
bool compareTo(const TagValue &other, TagValueComparisionFlags options=TagValueComparisionFlags::None) const
Returns whether both instances are equal.
Definition: tagvalue.cpp:188
CppUtilities::DateTime toDateTime() const
Converts the value of the current TagValue object to its equivalent DateTime representation.
Definition: tagvalue.cpp:594
void setDescription(std::string_view value, TagTextEncoding encoding=TagTextEncoding::Latin1)
Sets the description.
Definition: tagvalue.h:671
std::uint64_t toUnsignedInteger() const
Definition: tagvalue.cpp:413
std::int32_t toInteger() const
Converts the value of the current TagValue object to its equivalent integer representation.
Definition: tagvalue.cpp:371
PositionInSet toPositionInSet() const
Converts the value of the current TagValue object to its equivalent PositionInSet representation.
Definition: tagvalue.cpp:506
TagDataType type() const
Returns the type of the assigned value.
Definition: tagvalue.h:527
void assignTimeSpan(CppUtilities::TimeSpan value)
Assigns the given TimeSpan value.
Definition: tagvalue.h:500
Popularity toPopularity() const
Converts the value of the current TagValue object to its equivalent Popularity representation.
Definition: tagvalue.cpp:628
void assignDateTime(CppUtilities::DateTime value)
Assigns the given DateTime value.
Definition: tagvalue.h:508
std::size_t dataSize() const
Returns the size of the assigned value in bytes.
Definition: tagvalue.h:616
std::string toString(TagTextEncoding encoding=TagTextEncoding::Unspecified) const
Converts the value of the current TagValue object to its equivalent std::string representation.
Definition: tagvalue.h:544
int toStandardGenreIndex() const
Converts the value of the current TagValue object to its equivalent standard genre index.
Definition: tagvalue.cpp:456
CppUtilities::TimeSpan toTimeSpan() const
Converts the value of the current TagValue object to its equivalent TimeSpan representation.
Definition: tagvalue.cpp:555
char * dataPointer()
Returns a pointer to the raw data assigned to the current instance.
Definition: tagvalue.h:627
The TagValueTests class tests the TagParser::TagValue class.
Definition: tagvalue.cpp:22
void testBasics()
Definition: tagvalue.cpp:62
void testTimeSpan()
Definition: tagvalue.cpp:154
void tearDown() override
Definition: tagvalue.cpp:58
void testUnsignedInteger()
Definition: tagvalue.cpp:119
void setUp() override
Definition: tagvalue.cpp:54
void testBinary()
Definition: tagvalue.cpp:68
void testInteger()
Definition: tagvalue.cpp:79
void testDateTime()
Definition: tagvalue.cpp:167
void testPositionInSet()
Definition: tagvalue.cpp:142
void testEqualityOperator()
Definition: tagvalue.cpp:245
void testPopularity()
Definition: tagvalue.cpp:180
void testString()
Definition: tagvalue.cpp:196
Contains all classes and functions of the TagInfo library.
Definition: aaccodebook.h:10
std::string user
The user who gave the rating / played the file, e.g. identified by e-mail address.
Definition: tagvalue.h:74
double rating
The rating on a tag type specific scale.
Definition: tagvalue.h:76
CPPUNIT_TEST_SUITE_REGISTRATION(TagValueTests)