Changeset View
Changeset View
Standalone View
Standalone View
autotests/propertyinfotest.cpp
Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Line(s) | 49 | { | |||
---|---|---|---|---|---|
63 | 63 | | |||
64 | PropertyInfo duration(Property::Duration); | 64 | PropertyInfo duration(Property::Duration); | ||
65 | QCOMPARE(duration.formatAsDisplayString(QVariant(1800)), QStringLiteral("0:30:00")); | 65 | QCOMPARE(duration.formatAsDisplayString(QVariant(1800)), QStringLiteral("0:30:00")); | ||
66 | 66 | | |||
67 | PropertyInfo sampleRate(Property::SampleRate); | 67 | PropertyInfo sampleRate(Property::SampleRate); | ||
68 | QCOMPARE(sampleRate.formatAsDisplayString(QVariant(44100)), QString(QLocale().toString(44.1) + QStringLiteral(" kHz"))); | 68 | QCOMPARE(sampleRate.formatAsDisplayString(QVariant(44100)), QString(QLocale().toString(44.1) + QStringLiteral(" kHz"))); | ||
69 | 69 | | |||
70 | PropertyInfo bitRate(Property::BitRate); | 70 | PropertyInfo bitRate(Property::BitRate); | ||
71 | QCOMPARE(bitRate.formatAsDisplayString(QVariant(128000)), QStringLiteral("128 kB/s")); | 71 | QCOMPARE(bitRate.formatAsDisplayString(QVariant(128000)), QStringLiteral("128 kbit/s")); | ||
72 | QCOMPARE(bitRate.formatAsDisplayString(QVariant(1350000)), QString(QLocale().toString(1.35) + QStringLiteral(" Mbit/s"))); | ||||
73 | QCOMPARE(bitRate.formatAsDisplayString(QVariant(14700000)), QString(QLocale().toString(14.7) + QStringLiteral(" Mbit/s"))); | ||||
72 | 74 | | |||
73 | PropertyInfo orientation(Property::ImageOrientation); | 75 | PropertyInfo orientation(Property::ImageOrientation); | ||
74 | QCOMPARE(orientation.formatAsDisplayString(QVariant(5)), QStringLiteral("Transposed")); | 76 | QCOMPARE(orientation.formatAsDisplayString(QVariant(5)), QStringLiteral("Transposed")); | ||
75 | 77 | | |||
76 | PropertyInfo altitude(Property::PhotoGpsAltitude); | 78 | PropertyInfo altitude(Property::PhotoGpsAltitude); | ||
77 | QCOMPARE(altitude.formatAsDisplayString(QVariant(1.1)), QString(QLocale().toString(1.1) + QStringLiteral(" m"))); | 79 | QCOMPARE(altitude.formatAsDisplayString(QVariant(1.1)), QString(QLocale().toString(1.1) + QStringLiteral(" m"))); | ||
78 | 80 | | |||
79 | PropertyInfo latitude(Property::PhotoGpsLatitude); | 81 | PropertyInfo latitude(Property::PhotoGpsLatitude); | ||
Show All 10 Lines |