summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptengine
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-07-28 11:04:11 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-07-28 11:28:27 (GMT)
commitf3927de84b509a1be3f06182327e3c4cdea23b70 (patch)
tree6317d9783430ae754bf0c5d42b3bf1148ceb1860 /tests/auto/qscriptengine
parentacac0684d0eb13792cbb8b9bde6f077642dcc640 (diff)
downloadQt-f3927de84b509a1be3f06182327e3c4cdea23b70.zip
Qt-f3927de84b509a1be3f06182327e3c4cdea23b70.tar.gz
Qt-f3927de84b509a1be3f06182327e3c4cdea23b70.tar.bz2
Fix tst_QScriptEngine::uncaughtException
The test used to test that passing 0 as line number works. There is no reason to impose the lineNumber to be >= 1, this is an arbitrary limitation. It even works when passing negative value, but as -1 is a magic number, an error on line '-1' will not have lineNumber Reviewed-by: Kent Hansen
Diffstat (limited to 'tests/auto/qscriptengine')
-rw-r--r--tests/auto/qscriptengine/tst_qscriptengine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp
index 768fe3c..5c8aaf8 100644
--- a/tests/auto/qscriptengine/tst_qscriptengine.cpp
+++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp
@@ -1290,7 +1290,7 @@ void tst_QScriptEngine::uncaughtException()
QScriptEngine eng;
QScriptValue fun = eng.newFunction(myFunction);
QScriptValue throwFun = eng.newFunction(myThrowingFunction);
- for (int x = 0; x < 2; ++x) {
+ for (int x = -1; x < 2; ++x) {
{
QScriptValue ret = eng.evaluate("a = 10;\nb = 20;\n0 = 0;\n", /*fileName=*/QString(), /*lineNumber=*/x);
QVERIFY(eng.hasUncaughtException());