aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qv4assembler/tst_qv4assembler.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2019-04-23 09:33:25 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2019-04-23 09:34:29 +0200
commit580fa7dc88aae23053e44ffa335a15f6af112a20 (patch)
tree5bc915d7c2e252739122d9441bd0d7fa7175d0c2 /tests/auto/qml/qv4assembler/tst_qv4assembler.cpp
parent6767114285db9d0e16dc278d08f231e8561546b4 (diff)
parentc00283bb3bb966bf60c307ec8283bd98c12318bf (diff)
Merge remote-tracking branch 'origin/dev' into wip/scenegraphng
Diffstat (limited to 'tests/auto/qml/qv4assembler/tst_qv4assembler.cpp')
-rw-r--r--tests/auto/qml/qv4assembler/tst_qv4assembler.cpp23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/qml/qv4assembler/tst_qv4assembler.cpp b/tests/auto/qml/qv4assembler/tst_qv4assembler.cpp
index 4916cb4cc0..fd50ff5020 100644
--- a/tests/auto/qml/qv4assembler/tst_qv4assembler.cpp
+++ b/tests/auto/qml/qv4assembler/tst_qv4assembler.cpp
@@ -34,6 +34,8 @@
#include <QtQml/qqml.h>
#include <QtQml/qqmlapplicationengine.h>
+#include <private/qv4global_p.h>
+
#ifdef Q_OS_WIN
#include <windows.h>
#endif
@@ -46,6 +48,7 @@ private slots:
void initTestCase() override;
void perfMapFile();
void functionTable();
+ void jitEnabled();
};
void tst_QV4Assembler::initTestCase()
@@ -137,6 +140,26 @@ void tst_QV4Assembler::functionTable()
#endif
}
+#ifdef V4_ENABLE_JIT
+#define JIT_ENABLED 1
+#else
+#define JIT_ENABLED 0
+#endif
+
+void tst_QV4Assembler::jitEnabled()
+{
+#if defined(Q_OS_IOS) || defined(Q_OS_TVOS)
+ /* JIT should be disabled on iOS and tvOS. */
+ QCOMPARE(JIT_ENABLED, 0);
+#elif defined(Q_OS_WIN) && defined(Q_PROCESSOR_ARM)
+ /* JIT should be disabled Windows on ARM/ARM64 for now. */
+ QCOMPARE(JIT_ENABLED, 0);
+#else
+ /* JIT should be enabled on all other architectures/OSes tested in CI. */
+ QCOMPARE(JIT_ENABLED, 1);
+#endif
+}
+
QTEST_MAIN(tst_QV4Assembler)
#include "tst_qv4assembler.moc"