summaryrefslogtreecommitdiffstats
path: root/tests/auto/qscriptvalue
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@trolltech.com>2009-07-16 12:19:59 (GMT)
committerOlivier Goffart <ogoffart@trolltech.com>2009-07-16 15:13:36 (GMT)
commitdbff4e318aaba904f0c7dbf7720954d3514c904a (patch)
treedc14a7b23cf56332c77a5cee3b080c186784733a /tests/auto/qscriptvalue
parent11ba9df469af573dbfdf0754569b623b5ea44542 (diff)
downloadQt-dbff4e318aaba904f0c7dbf7720954d3514c904a.zip
Qt-dbff4e318aaba904f0c7dbf7720954d3514c904a.tar.gz
Qt-dbff4e318aaba904f0c7dbf7720954d3514c904a.tar.bz2
We cant rely on property attributes from JavaScriptCore for the setter and getter
Diffstat (limited to 'tests/auto/qscriptvalue')
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
index 0986fd3..f29fa82 100644
--- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
@@ -1832,6 +1832,9 @@ void tst_QScriptValue::getSetProperty()
// getter() returns this.x
object4.setProperty("foo", eng.newFunction(getter),
QScriptValue::PropertyGetter | QScriptValue::UserRange);
+ QCOMPARE(object4.propertyFlags("foo") & ~QScriptValue::UserRange,
+ QScriptValue::PropertyGetter );
+
QEXPECT_FAIL("", "User-range flags are not retained", Continue);
QCOMPARE(object4.propertyFlags("foo"),
QScriptValue::PropertyGetter | QScriptValue::UserRange);
@@ -1841,9 +1844,12 @@ void tst_QScriptValue::getSetProperty()
// setter() sets this.x
object4.setProperty("foo", eng.newFunction(setter),
QScriptValue::PropertySetter | QScriptValue::UserRange);
+ QCOMPARE(object4.propertyFlags("foo") & ~QScriptValue::UserRange,
+ QScriptValue::PropertySetter | QScriptValue::PropertyGetter);
+
QEXPECT_FAIL("", "User-range flags are not retained", Continue);
QCOMPARE(object4.propertyFlags("foo"),
- QScriptValue::PropertySetter | QScriptValue::UserRange);
+ QScriptValue::PropertySetter | QScriptValue::PropertyGetter | QScriptValue::UserRange);
object4.setProperty("foo", str);
QCOMPARE(object4.property("x").strictlyEquals(str), true);
QCOMPARE(object4.property("foo").strictlyEquals(str), true);