Changeset View
Changeset View
Standalone View
Standalone View
Modules/about-distro/autotests/OSReleaseTest.cpp
Show All 25 Lines | |||||
26 | { | 26 | { | ||
27 | Q_OBJECT | 27 | Q_OBJECT | ||
28 | private Q_SLOTS: | 28 | private Q_SLOTS: | ||
29 | void initTestCase() {} | 29 | void initTestCase() {} | ||
30 | 30 | | |||
31 | void testParse() | 31 | void testParse() | ||
32 | { | 32 | { | ||
33 | auto r = OSRelease(QFINDTESTDATA("data/os-release")); | 33 | auto r = OSRelease(QFINDTESTDATA("data/os-release")); | ||
34 | QCOMPARE(r.name, "Name"); | 34 | QCOMPARE(r.name(), "Name"); | ||
35 | QCOMPARE(r.version, "100.5"); | 35 | QCOMPARE(r.version(), "100.5"); | ||
36 | QCOMPARE(r.id, "theid"); | 36 | QCOMPARE(r.id(), "theid"); | ||
37 | QCOMPARE(r.idLike, QStringList({"otherid", "otherotherid"})); | 37 | QCOMPARE(r.idLike(), QStringList({"otherid", "otherotherid"})); | ||
38 | QCOMPARE(r.versionCodename, "versioncodename"); | 38 | QCOMPARE(r.versionCodename(), "versioncodename"); | ||
39 | QCOMPARE(r.versionId, "500.1"); | 39 | QCOMPARE(r.versionId(), "500.1"); | ||
40 | QCOMPARE(r.prettyName, "Pretty Name"); | 40 | QCOMPARE(r.prettyName(), "Pretty Name"); | ||
41 | QCOMPARE(r.ansiColor, "1;34"); | 41 | QCOMPARE(r.ansiColor(), "1;34"); | ||
42 | QCOMPARE(r.cpeName, "cpe:/o:foo:bar:100"); | 42 | QCOMPARE(r.cpeName(), "cpe:/o:foo:bar:100"); | ||
43 | QCOMPARE(r.homeUrl, "https://url.home"); | 43 | QCOMPARE(r.homeUrl(), "https://url.home"); | ||
44 | QCOMPARE(r.documentationUrl, "https://url.docs"); | 44 | QCOMPARE(r.documentationUrl(), "https://url.docs"); | ||
45 | QCOMPARE(r.supportUrl, "https://url.support"); | 45 | QCOMPARE(r.supportUrl(), "https://url.support"); | ||
46 | QCOMPARE(r.bugReportUrl, "https://url.bugs"); | 46 | QCOMPARE(r.bugReportUrl(), "https://url.bugs"); | ||
47 | QCOMPARE(r.privacyPolicyUrl, "https://url.privacy"); | 47 | QCOMPARE(r.privacyPolicyUrl(), "https://url.privacy"); | ||
48 | QCOMPARE(r.buildId, "105.5"); | 48 | QCOMPARE(r.buildId(), "105.5"); | ||
49 | QCOMPARE(r.variant, "Test Edition"); | 49 | QCOMPARE(r.variant(), "Test Edition"); | ||
50 | QCOMPARE(r.variantId, "test"); | 50 | QCOMPARE(r.variantId(), "test"); | ||
51 | QCOMPARE(r.logo, "start-here-test"); | 51 | QCOMPARE(r.logo(), "start-here-test"); | ||
52 | } | 52 | } | ||
53 | }; | 53 | }; | ||
54 | 54 | | |||
55 | QTEST_MAIN(OSReleaseTest) | 55 | QTEST_MAIN(OSReleaseTest) | ||
56 | 56 | | |||
57 | #include "OSReleaseTest.moc" | 57 | #include "OSReleaseTest.moc" |