Changeset View
Changeset View
Standalone View
Standalone View
autotests/propertyinfotest.cpp
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Line(s) | 49 | { | |||
---|---|---|---|---|---|
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 kB/s")); | ||
72 | 72 | | |||
73 | PropertyInfo orientation(Property::ImageOrientation); | 73 | PropertyInfo orientation(Property::ImageOrientation); | ||
74 | QCOMPARE(orientation.formatAsDisplayString(QVariant(5)), QStringLiteral("Transposed")); | 74 | QCOMPARE(orientation.formatAsDisplayString(QVariant(5)), QStringLiteral("Transposed")); | ||
75 | | ||||
76 | PropertyInfo altitude(Property::PhotoGpsAltitude); | ||||
77 | QCOMPARE(altitude.formatAsDisplayString(QVariant(1.1)), QString(QLocale().toString(1.1) + QStringLiteral(" m"))); | ||||
78 | | ||||
79 | PropertyInfo latitude(Property::PhotoGpsLatitude); | ||||
80 | QCOMPARE(latitude.formatAsDisplayString(QVariant(25)), QString(QLocale().toString(25) + QStringLiteral("°"))); | ||||
81 | | ||||
82 | PropertyInfo longitude(Property::PhotoGpsLongitude); | ||||
83 | QCOMPARE(longitude.formatAsDisplayString(QVariant(13.5)), QString(QLocale().toString(13.5) + QStringLiteral("°"))); | ||||
84 | | ||||
85 | PropertyInfo framerate(Property::FrameRate); | ||||
86 | QCOMPARE(framerate.formatAsDisplayString(QVariant(23)), QStringLiteral("23 fps")); | ||||
75 | } | 87 | } | ||
76 | 88 | | |||
77 | QTEST_GUILESS_MAIN(PropertyInfoTest) | 89 | QTEST_GUILESS_MAIN(PropertyInfoTest) |