From 3b5a3bc4bad98a3aac0da5c1b05f8f9fd4311cd3 Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Wed, 23 Feb 2011 13:07:11 +0100 Subject: Add expected failures for JSC-specific bugs We don't want to expect JSC's behavior, since it's not standard. It makes it confusing to run the tests on other (compliant) back-ends. Link to the corresponding upstream WebKit bugs. --- tests/auto/qscriptengine/tst_qscriptengine.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/auto/qscriptengine/tst_qscriptengine.cpp b/tests/auto/qscriptengine/tst_qscriptengine.cpp index ddfb753..82cb4fe 100644 --- a/tests/auto/qscriptengine/tst_qscriptengine.cpp +++ b/tests/auto/qscriptengine/tst_qscriptengine.cpp @@ -469,10 +469,10 @@ void tst_QScriptEngine::newArray_HooliganTask233836() { QScriptEngine eng; { + // According to ECMA-262, this should cause a RangeError. QScriptValue ret = eng.evaluate("a = new Array(4294967295); a.push('foo')"); - QVERIFY(ret.isNumber()); - QCOMPARE(ret.toInt32(), 0); - QCOMPARE(eng.evaluate("a[4294967295]").toString(), QString::fromLatin1("foo")); + QEXPECT_FAIL("", "ECMA compliance bug in Array.prototype.push: https://bugs.webkit.org/show_bug.cgi?id=55033", Continue); + QVERIFY(ret.isError() && ret.toString().contains(QLatin1String("RangeError"))); } { QScriptValue ret = eng.newArray(0xFFFFFFFF); @@ -671,7 +671,8 @@ void tst_QScriptEngine::jsRegExp() QCOMPARE(r5.toString(), QString::fromLatin1("/foo/gim")); // In JSC, constructing a RegExp from another produces the same identical object. // This is different from SpiderMonkey and old back-end. - QVERIFY(r5.strictlyEquals(r)); + QEXPECT_FAIL("", "RegExp copy-constructor should return a new object: https://bugs.webkit.org/show_bug.cgi?id=55040", Continue); + QVERIFY(!r5.strictlyEquals(r)); QScriptValue r6 = rxCtor.construct(QScriptValueList() << "foo" << "bar"); QVERIFY(r6.isError()); @@ -1315,7 +1316,7 @@ void tst_QScriptEngine::globalObjectProperties() QCOMPARE(global.propertyFlags("URIError"), QScriptValue::SkipInEnumeration); QVERIFY(global.property("Math").isObject()); QVERIFY(!global.property("Math").isFunction()); - QEXPECT_FAIL("", "[ECMA compliance] JSC sets DontDelete flag for Math object", Continue); + QEXPECT_FAIL("", "[ECMA compliance] JSC sets DontDelete flag for Math object: https://bugs.webkit.org/show_bug.cgi?id=55034", Continue); QCOMPARE(global.propertyFlags("Math"), QScriptValue::SkipInEnumeration); } -- cgit v0.12