summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qscriptvalue/tst_qscriptvalue.cpp1
-rw-r--r--tests/benchmarks/qscriptvalue/tst_qscriptvalue.cpp12
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
index 3f231f2..e712017 100644
--- a/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
+++ b/tests/auto/qscriptvalue/tst_qscriptvalue.cpp
@@ -2106,6 +2106,7 @@ void tst_QScriptValue::getSetProperty()
object.setProperty(foo, num);
QVERIFY(object.property(foo).strictlyEquals(num));
QVERIFY(object.property("foo").strictlyEquals(num));
+ QVERIFY(object.propertyFlags(foo) == 0);
}
void tst_QScriptValue::getSetPrototype()
diff --git a/tests/benchmarks/qscriptvalue/tst_qscriptvalue.cpp b/tests/benchmarks/qscriptvalue/tst_qscriptvalue.cpp
index 904674e..b637591 100644
--- a/tests/benchmarks/qscriptvalue/tst_qscriptvalue.cpp
+++ b/tests/benchmarks/qscriptvalue/tst_qscriptvalue.cpp
@@ -68,6 +68,7 @@ private slots:
void toQObject();
void property();
void setProperty();
+ void propertyFlags();
};
tst_QScriptValue::tst_QScriptValue()
@@ -189,5 +190,16 @@ void tst_QScriptValue::setProperty()
}
}
+void tst_QScriptValue::propertyFlags()
+{
+ QScriptEngine engine;
+ QScriptValue obj = engine.newObject();
+ QString propertyName = QString::fromLatin1("foo");
+ obj.setProperty(propertyName, 123, QScriptValue::SkipInEnumeration | QScriptValue::ReadOnly);
+ QBENCHMARK {
+ (void)obj.propertyFlags(propertyName);
+ }
+}
+
QTEST_MAIN(tst_QScriptValue)
#include "tst_qscriptvalue.moc"