From fc40195166040af252146dcea627c590e8f101e0 Mon Sep 17 00:00:00 2001 From: Sascha Kolewa Date: Mon, 20 Dec 2010 16:22:58 +0100 Subject: Test case for objects --- tests/qmlauto/tst_compare.qml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/qmlauto/tst_compare.qml (limited to 'tests') 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"); + } +} -- cgit v1.2.3