diff options
author | Kai Koehne <kai.koehne@theqtcompany.com> | 2014-12-03 10:41:48 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2014-12-05 14:02:38 +0100 |
commit | de748023e53ce84afd01cde0ca380cddad057a4d (patch) | |
tree | 9f20ee8f0e374ac97ac37f8df2fa8ba56341481b /tests/auto/installer/scriptengine | |
parent | 587bc6fb7c905422c3f09bc8ea2ac91c91d25cc8 (diff) |
Expose systemInfo API
Add systemInfo as a wrapper for QSystemInfo.
Task-number: QTIFW-592
Change-Id: Ib54fcea8b0ef3a397a74f5315202f3000abd63cd
Reviewed-by: Niels Weber <niels.weber@theqtcompany.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
Diffstat (limited to 'tests/auto/installer/scriptengine')
-rw-r--r-- | tests/auto/installer/scriptengine/tst_scriptengine.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/installer/scriptengine/tst_scriptengine.cpp b/tests/auto/installer/scriptengine/tst_scriptengine.cpp index de5b32076..23cb56dd0 100644 --- a/tests/auto/installer/scriptengine/tst_scriptengine.cpp +++ b/tests/auto/installer/scriptengine/tst_scriptengine.cpp @@ -159,6 +159,19 @@ private slots: QCOMPARE(global.hasProperty(QLatin1String("gui")), true); QCOMPARE(global.hasProperty(QLatin1String("qsTr")), true); + + QCOMPARE(global.hasProperty(QLatin1String("systemInfo")), true); + QJSValue sinfo = global.property(QLatin1String("systemInfo")); + QCOMPARE(sinfo.property(QLatin1String("currentCpuArchitecture")).toString(), + QSysInfo::currentCpuArchitecture()); + QCOMPARE(sinfo.property(QLatin1String("kernelType")).toString(), QSysInfo::kernelType()); + QCOMPARE(sinfo.property(QLatin1String("kernelVersion")).toString(), + QSysInfo::kernelVersion()); + QCOMPARE(sinfo.property(QLatin1String("productType")).toString(), QSysInfo::productType()); + QCOMPARE(sinfo.property(QLatin1String("productVersion")).toString(), + QSysInfo::productVersion()); + QCOMPARE(sinfo.property(QLatin1String("prettyProductName")).toString(), + QSysInfo::prettyProductName()); } void testBrokenJSMethodConnect() |