Skip to content

Commit

Permalink
Autotest
Browse files Browse the repository at this point in the history
Change-Id: I796ef5e0d70a7e3a95858468583c4ecb447991ee
Task-number: QTBUG-21864
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
  • Loading branch information
Aaron Kennedy authored and Qt by Nokia committed Dec 1, 2011
1 parent c35b80a commit 7980f7a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
@@ -0,0 +1,2 @@
var a = { b: 10 }
var test = (typeof a) == "object"
@@ -0,0 +1,6 @@
import "qtbug_21864.js" as Test
import QtQuick 1.0

QtObject {
property bool test: Test.test
}
Expand Up @@ -203,6 +203,7 @@ private slots:
void qtbug_10696();
void qtbug_11606();
void qtbug_11600();
void qtbug_21864();
void nonscriptable();
void deleteLater();
void in();
Expand Down Expand Up @@ -4851,6 +4852,15 @@ void tst_qdeclarativeecmascript::qtbug_11600()
delete o;
}

void tst_qdeclarativeecmascript::qtbug_21864()
{
QDeclarativeComponent component(&engine, TEST_FILE("qtbug_21864.qml"));
QObject *o = component.create();
QVERIFY(o != 0);
QCOMPARE(o->property("test").toBool(), true);
delete o;
}

// Reading and writing non-scriptable properties should fail
void tst_qdeclarativeecmascript::nonscriptable()
{
Expand Down

0 comments on commit 7980f7a

Please sign in to comment.