diff options
author | Sascha Kolewa <sascha.kolewa@nokia.com> | 2010-12-20 16:22:58 +0100 |
---|---|---|
committer | Sascha Kolewa <sascha.kolewa@nokia.com> | 2010-12-20 16:22:58 +0100 |
commit | fc40195166040af252146dcea627c590e8f101e0 (patch) | |
tree | 20b8309a3e8ae46be8e219148646b86f3b405771 /tests/qmlauto | |
parent | 81e09bb0d7bb5b8ce58773f5e9422b3c507006dd (diff) |
Test case for objects
Diffstat (limited to 'tests/qmlauto')
-rw-r--r-- | tests/qmlauto/tst_compare.qml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/qmlauto/tst_compare.qml b/tests/qmlauto/tst_compare.qml new file mode 100644 index 0000000..579ca41 --- /dev/null +++ b/tests/qmlauto/tst_compare.qml @@ -0,0 +1,12 @@ +import Qt 4.7 +import QtQuickTest 1.0 + +TestCase { + function test_compare_objects() { + var testObj1 = {a: 1, b: "foo", c: true}; + compare(testObj1, testObj1, "Object identity"); + + var testObj2 = {a: 1, b: "foo", c: true}; + compare(testObj1, testObj2, "Object equality"); + } +} |