Changeset View
Changeset View
Standalone View
Standalone View
autotests/propertyinfotest.cpp
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Line(s) | 49 | { | |||
---|---|---|---|---|---|
51 | QCOMPARE(emptyProperty.formatAsDisplayString(QVariant(QStringLiteral("empty"))), QStringLiteral("empty")); | 51 | QCOMPARE(emptyProperty.formatAsDisplayString(QVariant(QStringLiteral("empty"))), QStringLiteral("empty")); | ||
52 | 52 | | |||
53 | PropertyInfo year(Property::DiscNumber); | 53 | PropertyInfo year(Property::DiscNumber); | ||
54 | QCOMPARE(year.formatAsDisplayString(QVariant(2018)), QStringLiteral("2018")); | 54 | QCOMPARE(year.formatAsDisplayString(QVariant(2018)), QStringLiteral("2018")); | ||
55 | 55 | | |||
56 | PropertyInfo title(Property::Title); | 56 | PropertyInfo title(Property::Title); | ||
57 | QCOMPARE(title.formatAsDisplayString(QVariant(QStringLiteral("Title"))), QStringLiteral("Title")); | 57 | QCOMPARE(title.formatAsDisplayString(QVariant(QStringLiteral("Title"))), QStringLiteral("Title")); | ||
58 | 58 | | |||
59 | QStringList artistList = {QStringLiteral("Artist1"), QStringLiteral("Artist2")}; | 59 | QStringList artistList = {QStringLiteral("Artist1"), QStringLiteral("Artist2"), QStringLiteral("Artist3")}; | ||
60 | PropertyInfo artist(Property::Artist); | 60 | PropertyInfo artist(Property::Artist); | ||
61 | QCOMPARE(artist.formatAsDisplayString(QVariant(artistList)), QStringLiteral("Artist1, Artist2")); | 61 | QCOMPARE(artist.formatAsDisplayString(QVariant(artistList)), QStringLiteral("Artist1, Artist2, and Artist3")); | ||
62 | 62 | | |||
63 | QStringList authorList = {QStringLiteral("Author1")}; | 63 | QStringList authorList = {QStringLiteral("Author1")}; | ||
64 | PropertyInfo author(Property::Author); | 64 | PropertyInfo author(Property::Author); | ||
65 | QCOMPARE(author.formatAsDisplayString(QVariant(authorList)), QStringLiteral("Author1")); | 65 | QCOMPARE(author.formatAsDisplayString(QVariant(authorList)), QStringLiteral("Author1")); | ||
66 | 66 | | |||
67 | PropertyInfo duration(Property::Duration); | 67 | PropertyInfo duration(Property::Duration); | ||
68 | QCOMPARE(duration.formatAsDisplayString(QVariant(1800)), QStringLiteral("0:30:00")); | 68 | QCOMPARE(duration.formatAsDisplayString(QVariant(1800)), QStringLiteral("0:30:00")); | ||
69 | 69 | | |||
Show All 34 Lines |