aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qjsengine/tst_qjsengine.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-05-04 23:57:45 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2013-05-05 14:16:06 +0200
commit84ec47743d110a9e857a6a8ae56dc8734792d8aa (patch)
treed0973429f89eefe687cd0e0385a47ab58da4145d /tests/auto/qml/qjsengine/tst_qjsengine.cpp
parent2a71d0e938a8ea42223d33dfab71cf9bb982d804 (diff)
Fix keywords test
The reserved keywords are allowed as property names in objects. Change-Id: I5e0025ff374e0e154df81590660fc96b5c529ea4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests/auto/qml/qjsengine/tst_qjsengine.cpp')
-rw-r--r--tests/auto/qml/qjsengine/tst_qjsengine.cpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
index 353d01254d..9050fb90f5 100644
--- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp
+++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp
@@ -2349,27 +2349,16 @@ void tst_QJSEngine::jsFutureReservedWords()
QCOMPARE(!ret.isError(), allowed);
}
{
- // this should probably be allowed (see task 162567)
QJSEngine eng;
QJSValue ret = eng.evaluate("o = {}; o." + word + " = 123");
- QEXPECT_FAIL("class", "QTBUG-27193", Abort);
- QEXPECT_FAIL("const", "QTBUG-27193", Abort);
- QEXPECT_FAIL("debugger", "QTBUG-27193", Abort);
- QEXPECT_FAIL("enum", "QTBUG-27193", Abort);
- QEXPECT_FAIL("export", "QTBUG-27193", Abort);
- QEXPECT_FAIL("extends", "QTBUG-27193", Abort);
- QEXPECT_FAIL("import", "QTBUG-27193", Abort);
- QEXPECT_FAIL("super", "QTBUG-27193", Abort);
-
- QCOMPARE(ret.isNumber(), allowed);
- QCOMPARE(!ret.isError(), allowed);
+ QCOMPARE(ret.isNumber(), true);
+ QCOMPARE(!ret.isError(), true);
}
{
- // this should probably be allowed (see task 162567)
QJSEngine eng;
QJSValue ret = eng.evaluate("o = { " + word + ": 123 }");
- QCOMPARE(!ret.isError(), allowed);
+ QCOMPARE(!ret.isError(), true);
}
}