From 84ec47743d110a9e857a6a8ae56dc8734792d8aa Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Sat, 4 May 2013 23:57:45 +0200 Subject: Fix keywords test The reserved keywords are allowed as property names in objects. Change-Id: I5e0025ff374e0e154df81590660fc96b5c529ea4 Reviewed-by: Simon Hausmann --- tests/auto/qml/qjsengine/tst_qjsengine.cpp | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'tests/auto/qml/qjsengine/tst_qjsengine.cpp') 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); } } -- cgit v1.2.3