summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAleksandar Sasha Babic <aleksandar.babic@nokia.com>2010-02-01 12:04:30 (GMT)
committerAleksandar Sasha Babic <aleksandar.babic@nokia.com>2010-02-01 12:33:21 (GMT)
commit59d3c69f0294f930c81ac14269ba20d376d1c13c (patch)
tree88c9e8654304c53de138d00c170033b1fb3b98a9 /tests
parente63ea3587444e122242a137a699b5a717d3d26bd (diff)
downloadQt-59d3c69f0294f930c81ac14269ba20d376d1c13c.zip
Qt-59d3c69f0294f930c81ac14269ba20d376d1c13c.tar.gz
Qt-59d3c69f0294f930c81ac14269ba20d376d1c13c.tar.bz2
Fixing test to be runnable on Symbian devices.
One of the cases is using too much memory so it had to be trimmed down. Reviewed-by: TrustMe
Diffstat (limited to 'tests')
-rw-r--r--tests/benchmarks/qscriptengine/qscriptengine.pro5
-rw-r--r--tests/benchmarks/qscriptengine/tst_qscriptengine.cpp5
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/benchmarks/qscriptengine/qscriptengine.pro b/tests/benchmarks/qscriptengine/qscriptengine.pro
index 22bbccd..df6dbb3 100644
--- a/tests/benchmarks/qscriptengine/qscriptengine.pro
+++ b/tests/benchmarks/qscriptengine/qscriptengine.pro
@@ -5,3 +5,8 @@ TARGET = tst_qscriptengine
SOURCES += tst_qscriptengine.cpp
QT += script
+
+symbian* {
+ TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 // Min 128kB, Max 32MB
+ TARGET.EPOCSTACKSIZE = 0x14000
+}
diff --git a/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp b/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp
index b42a355..6c6f0b1 100644
--- a/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp
+++ b/tests/benchmarks/qscriptengine/tst_qscriptengine.cpp
@@ -256,8 +256,13 @@ void tst_QScriptEngine::nativeCall()
QScriptEngine eng;
eng.globalObject().setProperty("fun", eng.newFunction(native_function));
QBENCHMARK{
+#if !defined(Q_OS_SYMBIAN)
eng.evaluate("var w = 0; for (i = 0; i < 100000; ++i) {\n"
" w += fun() + fun(); w -= fun(); fun(); w -= fun(); }");
+#else
+ eng.evaluate("var w = 0; for (i = 0; i < 25000; ++i) {\n"
+ " w += fun() + fun(); w -= fun(); fun(); w -= fun(); }");
+#endif
}
}