Changeset View
Changeset View
Standalone View
Standalone View
autotests/testedid.cpp
Show First 20 Lines • Show All 55 Lines • ▼ Show 20 Line(s) | 52 | { | |||
---|---|---|---|---|---|
56 | QTest::addColumn<QString>("name"); | 56 | QTest::addColumn<QString>("name"); | ||
57 | QTest::addColumn<QString>("pnpId"); | 57 | QTest::addColumn<QString>("pnpId"); | ||
58 | // List of potential vendor names, this depends on the availablility | 58 | // List of potential vendor names, this depends on the availablility | ||
59 | // of pnp.ids, otherwise it will be a three letter abbreviation. | 59 | // of pnp.ids, otherwise it will be a three letter abbreviation. | ||
60 | QTest::addColumn<QStringList>("vendor"); | 60 | QTest::addColumn<QStringList>("vendor"); | ||
61 | QTest::addColumn<QString>("serial"); | 61 | QTest::addColumn<QString>("serial"); | ||
62 | QTest::addColumn<QString>("eisaId"); | 62 | QTest::addColumn<QString>("eisaId"); | ||
63 | QTest::addColumn<QString>("hash"); | 63 | QTest::addColumn<QString>("hash"); | ||
64 | QTest::addColumn<int>("width"); | 64 | QTest::addColumn<uint>("width"); | ||
65 | QTest::addColumn<int>("height"); | 65 | QTest::addColumn<uint>("height"); | ||
66 | QTest::addColumn<qreal>("gamma"); | 66 | QTest::addColumn<qreal>("gamma"); | ||
67 | 67 | | |||
68 | QTest::addColumn<QQuaternion>("red"); | 68 | QTest::addColumn<QQuaternion>("red"); | ||
69 | QTest::addColumn<QQuaternion>("green"); | 69 | QTest::addColumn<QQuaternion>("green"); | ||
70 | QTest::addColumn<QQuaternion>("blue"); | 70 | QTest::addColumn<QQuaternion>("blue"); | ||
71 | QTest::addColumn<QQuaternion>("white"); | 71 | QTest::addColumn<QQuaternion>("white"); | ||
72 | 72 | | |||
73 | QTest::addRow("cor") | 73 | QTest::addRow("cor") | ||
74 | << QByteArray::fromBase64("AP///////wAN8iw0AAAAABwVAQOAHRB4CoPVlFdSjCccUFQAAAABAQEBAQEBAQEBAQEBAQEBEhtWWlAAGTAwIDYAJaQQAAAYEhtWWlAAGTAwIDYAJaQQAAAYAAAA/gBBVU8KICAgICAgICAgAAAA/gBCMTMzWFcwMyBWNCAKAIc=") | 74 | << QByteArray::fromBase64("AP///////wAN8iw0AAAAABwVAQOAHRB4CoPVlFdSjCccUFQAAAABAQEBAQEBAQEBAQEBAQEBEhtWWlAAGTAwIDYAJaQQAAAYEhtWWlAAGTAwIDYAJaQQAAAYAAAA/gBBVU8KICAgICAgICAgAAAA/gBCMTMzWFcwMyBWNCAKAIc=") | ||
75 | << QStringLiteral("xrandr-unknown") | 75 | << QStringLiteral("xrandr-unknown") | ||
76 | << QStringLiteral("") | 76 | << QStringLiteral("") | ||
77 | << QStringLiteral("COR") | 77 | << QStringLiteral("COR") | ||
78 | << QStringList({QStringLiteral("COR"), QStringLiteral("Corollary Inc")}) | 78 | << QStringList({QStringLiteral("COR"), QStringLiteral("Corollary Inc")}) | ||
79 | << QStringLiteral("") | 79 | << QStringLiteral("") | ||
80 | << QStringLiteral("B133XW03 V4") | 80 | << QStringLiteral("B133XW03 V4") | ||
81 | << QStringLiteral("82266089b3f9da3a8c48de1ec81b09e1") | 81 | << QStringLiteral("82266089b3f9da3a8c48de1ec81b09e1") | ||
82 | << 29 << 16 << 2.2 | 82 | << 29U << 16U << 2.2 | ||
83 | << QQuaternion(1, QVector3D(0.580078, 0.339844, 0)) | 83 | << QQuaternion(1, QVector3D(0.580078, 0.339844, 0)) | ||
84 | << QQuaternion(1, QVector3D(0.320313, 0.549805, 0)) | 84 | << QQuaternion(1, QVector3D(0.320313, 0.549805, 0)) | ||
85 | << QQuaternion(1, QVector3D(0.155273, 0.110352, 0)) | 85 | << QQuaternion(1, QVector3D(0.155273, 0.110352, 0)) | ||
86 | << QQuaternion(1, QVector3D(0.313477, 0.329102, 0)); | 86 | << QQuaternion(1, QVector3D(0.313477, 0.329102, 0)); | ||
87 | 87 | | |||
88 | QTest::addRow("dell") | 88 | QTest::addRow("dell") | ||
89 | << QByteArray::fromBase64("AP///////wAQrBbwTExLQQ4WAQOANCB46h7Frk80sSYOUFSlSwCBgKlA0QBxTwEBAQEBAQEBKDyAoHCwI0AwIDYABkQhAAAaAAAA/wBGNTI1TTI0NUFLTEwKAAAA/ABERUxMIFUyNDEwCiAgAAAA/QA4TB5REQAKICAgICAgAToCAynxUJAFBAMCBxYBHxITFCAVEQYjCQcHZwMMABAAOC2DAQAA4wUDAQI6gBhxOC1AWCxFAAZEIQAAHgEdgBhxHBYgWCwlAAZEIQAAngEdAHJR0B4gbihVAAZEIQAAHowK0Iog4C0QED6WAAZEIQAAGAAAAAAAAAAAAAAAAAAAPg==") | 89 | << QByteArray::fromBase64("AP///////wAQrBbwTExLQQ4WAQOANCB46h7Frk80sSYOUFSlSwCBgKlA0QBxTwEBAQEBAQEBKDyAoHCwI0AwIDYABkQhAAAaAAAA/wBGNTI1TTI0NUFLTEwKAAAA/ABERUxMIFUyNDEwCiAgAAAA/QA4TB5REQAKICAgICAgAToCAynxUJAFBAMCBxYBHxITFCAVEQYjCQcHZwMMABAAOC2DAQAA4wUDAQI6gBhxOC1AWCxFAAZEIQAAHgEdgBhxHBYgWCwlAAZEIQAAngEdAHJR0B4gbihVAAZEIQAAHowK0Iog4C0QED6WAAZEIQAAGAAAAAAAAAAAAAAAAAAAPg==") | ||
90 | << QStringLiteral("xrandr-DELL U2410-F525M245AKLL") | 90 | << QStringLiteral("xrandr-DELL U2410-F525M245AKLL") | ||
91 | << QStringLiteral("DELL U2410") | 91 | << QStringLiteral("DELL U2410") | ||
92 | << QStringLiteral("DEL") | 92 | << QStringLiteral("DEL") | ||
93 | << QStringList({QStringLiteral("DEL"), QStringLiteral("Dell Inc.")}) | 93 | << QStringList({QStringLiteral("DEL"), QStringLiteral("Dell Inc.")}) | ||
94 | << QStringLiteral("F525M245AKLL") | 94 | << QStringLiteral("F525M245AKLL") | ||
95 | << QStringLiteral("") | 95 | << QStringLiteral("") | ||
96 | << QStringLiteral("be55eeb5fcc1e775f321c1ae3aa02ef0") | 96 | << QStringLiteral("be55eeb5fcc1e775f321c1ae3aa02ef0") | ||
97 | << 52 << 32 << 2.2 | 97 | << 52U << 32U << 2.2 | ||
98 | << QQuaternion(1, QVector3D(0.679688, 0.308594, 0)) | 98 | << QQuaternion(1, QVector3D(0.679688, 0.308594, 0)) | ||
99 | << QQuaternion(1, QVector3D(0.206055, 0.693359, 0)) | 99 | << QQuaternion(1, QVector3D(0.206055, 0.693359, 0)) | ||
100 | << QQuaternion(1, QVector3D(0.151367, 0.0546875, 0)) | 100 | << QQuaternion(1, QVector3D(0.151367, 0.0546875, 0)) | ||
101 | << QQuaternion(1, QVector3D(0.313477, 0.329102, 0)); | 101 | << QQuaternion(1, QVector3D(0.313477, 0.329102, 0)); | ||
102 | 102 | | |||
103 | QTest::addRow("samsung") << QByteArray::fromBase64("AP///////wBMLcMFMzJGRQkUAQMOMx14Ku6Ro1RMmSYPUFQjCACBAIFAgYCVAKlAswABAQEBAjqAGHE4LUBYLEUA/h8RAAAeAAAA/QA4PB5REQAKICAgICAgAAAA/ABTeW5jTWFzdGVyCiAgAAAA/wBIOU1aMzAyMTk2CiAgAC4=") | 103 | QTest::addRow("samsung") << QByteArray::fromBase64("AP///////wBMLcMFMzJGRQkUAQMOMx14Ku6Ro1RMmSYPUFQjCACBAIFAgYCVAKlAswABAQEBAjqAGHE4LUBYLEUA/h8RAAAeAAAA/QA4PB5REQAKICAgICAgAAAA/ABTeW5jTWFzdGVyCiAgAAAA/wBIOU1aMzAyMTk2CiAgAC4=") | ||
104 | << QStringLiteral("xrandr-SyncMaster-H9MZ302196") | 104 | << QStringLiteral("xrandr-SyncMaster-H9MZ302196") | ||
105 | << QStringLiteral("SyncMaster") | 105 | << QStringLiteral("SyncMaster") | ||
106 | << QStringLiteral("SAM") | 106 | << QStringLiteral("SAM") | ||
107 | << QStringList({QStringLiteral("SAM"), QStringLiteral("Samsung Electric Company")}) | 107 | << QStringList({QStringLiteral("SAM"), QStringLiteral("Samsung Electric Company")}) | ||
108 | << QStringLiteral("H9MZ302196") | 108 | << QStringLiteral("H9MZ302196") | ||
109 | << QStringLiteral("") | 109 | << QStringLiteral("") | ||
110 | << QStringLiteral("9384061b2b87ad193f841e07d60e9e1a") | 110 | << QStringLiteral("9384061b2b87ad193f841e07d60e9e1a") | ||
111 | << 51 << 29 << 2.2 | 111 | << 51U << 29U << 2.2 | ||
112 | << QQuaternion(1, QVector3D(0.639648, 0.328125, 0)) | 112 | << QQuaternion(1, QVector3D(0.639648, 0.328125, 0)) | ||
113 | << QQuaternion(1, QVector3D(0.299805, 0.599609, 0)) | 113 | << QQuaternion(1, QVector3D(0.299805, 0.599609, 0)) | ||
114 | << QQuaternion(1, QVector3D(0.150391, 0.0595703, 0)) | 114 | << QQuaternion(1, QVector3D(0.150391, 0.0595703, 0)) | ||
115 | << QQuaternion(1, QVector3D(0.3125, 0.329102, 0)); | 115 | << QQuaternion(1, QVector3D(0.3125, 0.329102, 0)); | ||
116 | 116 | | |||
117 | QTest::newRow("sharp") | 117 | QTest::newRow("sharp") | ||
118 | << QByteArray::fromBase64("AP///////wBNEEoUAAAAAB4ZAQSlHRF4Dt5Qo1RMmSYPUFQAAAABAQEBAQEBAQEBAQEBAQEBzZGAoMAINHAwIDUAJqUQAAAYpHSAoMAINHAwIDUAJqUQAAAYAAAA/gBSWE40OYFMUTEzM1oxAAAAAAACQQMoABIAAAsBCiAgAMw=") | 118 | << QByteArray::fromBase64("AP///////wBNEEoUAAAAAB4ZAQSlHRF4Dt5Qo1RMmSYPUFQAAAABAQEBAQEBAQEBAQEBAQEBzZGAoMAINHAwIDUAJqUQAAAYpHSAoMAINHAwIDUAJqUQAAAYAAAA/gBSWE40OYFMUTEzM1oxAAAAAAACQQMoABIAAAsBCiAgAMw=") | ||
119 | << QStringLiteral("xrandr-unknown") | 119 | << QStringLiteral("xrandr-unknown") | ||
120 | << QString() // unsure why, this screen reports no name | 120 | << QString() // unsure why, this screen reports no name | ||
121 | << QStringLiteral("SHP") | 121 | << QStringLiteral("SHP") | ||
122 | << QStringList({QStringLiteral("SHP"), QStringLiteral("Sharp Corporation")}) | 122 | << QStringList({QStringLiteral("SHP"), QStringLiteral("Sharp Corporation")}) | ||
123 | << QStringLiteral("") | 123 | << QStringLiteral("") | ||
124 | << QStringLiteral("RXN49\uFFFDLQ133Z1") | 124 | << QStringLiteral("RXN49\uFFFDLQ133Z1") | ||
125 | << QStringLiteral("3627c3534e4c82871967b57237bf5b83") | 125 | << QStringLiteral("3627c3534e4c82871967b57237bf5b83") | ||
126 | << 29 << 17 << 2.2 | 126 | << 29U << 17U << 2.2 | ||
127 | << QQuaternion(1, QVector3D(0.639648, 0.328125, 0)) | 127 | << QQuaternion(1, QVector3D(0.639648, 0.328125, 0)) | ||
128 | << QQuaternion(1, QVector3D(0.299805, 0.599609, 0)) | 128 | << QQuaternion(1, QVector3D(0.299805, 0.599609, 0)) | ||
129 | << QQuaternion(1, QVector3D(0.149414, 0.0595703, 0)) | 129 | << QQuaternion(1, QVector3D(0.149414, 0.0595703, 0)) | ||
130 | << QQuaternion(1, QVector3D(0.3125, 0.328125, 0)); | 130 | << QQuaternion(1, QVector3D(0.3125, 0.328125, 0)); | ||
131 | } | 131 | } | ||
132 | 132 | | |||
133 | void TestEdid::testEdidParser() | 133 | void TestEdid::testEdidParser() | ||
134 | { | 134 | { | ||
135 | QFETCH(QByteArray, raw_edid); | 135 | QFETCH(QByteArray, raw_edid); | ||
136 | QFETCH(QString, deviceId); | 136 | QFETCH(QString, deviceId); | ||
137 | QFETCH(QString, name); | 137 | QFETCH(QString, name); | ||
138 | QFETCH(QString, pnpId); | 138 | QFETCH(QString, pnpId); | ||
139 | QFETCH(QStringList, vendor); | 139 | QFETCH(QStringList, vendor); | ||
140 | QFETCH(QString, serial); | 140 | QFETCH(QString, serial); | ||
141 | QFETCH(QString, eisaId); | 141 | QFETCH(QString, eisaId); | ||
142 | QFETCH(QString, hash); | 142 | QFETCH(QString, hash); | ||
143 | QFETCH(int, width); | 143 | QFETCH(uint, width); | ||
144 | QFETCH(int, height); | 144 | QFETCH(uint, height); | ||
145 | QFETCH(qreal, gamma); | 145 | QFETCH(qreal, gamma); | ||
146 | QFETCH(QQuaternion, red); | 146 | QFETCH(QQuaternion, red); | ||
147 | QFETCH(QQuaternion, green); | 147 | QFETCH(QQuaternion, green); | ||
148 | QFETCH(QQuaternion, blue); | 148 | QFETCH(QQuaternion, blue); | ||
149 | QFETCH(QQuaternion, white); | 149 | QFETCH(QQuaternion, white); | ||
150 | 150 | | |||
151 | QScopedPointer<Edid> e(new Edid(raw_edid)); | 151 | QScopedPointer<Edid> e(new Edid(raw_edid)); | ||
152 | QCOMPARE(e->isValid(), true); | 152 | QCOMPARE(e->isValid(), true); | ||
Show All 23 Lines |