summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/qmlauto/tst_compare.qml12
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");
+ }
+}